forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathash_window_manager.h
58 lines (46 loc) · 1.99 KB
/
ash_window_manager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WS_ASH_WINDOW_MANAGER_H_
#define ASH_WS_ASH_WINDOW_MANAGER_H_
#include "ash/frame/ash_frame_caption_controller.h"
#include "ash/public/cpp/menu_utils.h"
#include "ash/public/interfaces/ash_window_manager.mojom.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
#include "services/ws/common/types.h"
#include "services/ws/window_manager_interface.h"
namespace mojo {
class ScopedInterfaceEndpointHandle;
}
namespace ws {
class WindowTree;
}
namespace ash {
// Implementation of mojom::AshWindowManager, see it for details.
class AshWindowManager : public mojom::AshWindowManager,
public ws::WindowManagerInterface {
public:
AshWindowManager(ws::WindowTree* window_tree,
mojo::ScopedInterfaceEndpointHandle handle);
~AshWindowManager() override;
// mojom::AshWindowManager:
void AddWindowToTabletMode(ws::Id window_id) override;
void ShowSnapPreview(ws::Id window_id, mojom::SnapDirection snap) override;
void CommitSnap(ws::Id window_id, mojom::SnapDirection snap) override;
void LockOrientation(ws::Id window_id,
mojom::OrientationLockType lock_orientation) override;
void UnlockOrientation(ws::Id window_id) override;
void MaximizeWindowByCaptionClick(ws::Id window_id,
ui::mojom::PointerKind pointer) override;
void BounceWindow(ws::Id window_id) override;
void SetWindowFrameMenuItems(ws::Id window_id,
menu_utils::MenuItemList menu_item_list,
mojom::MenuDelegatePtr delegate) override;
private:
ws::WindowTree* window_tree_;
mojo::AssociatedBinding<mojom::AshWindowManager> binding_;
AshFrameCaptionController caption_controller_;
DISALLOW_COPY_AND_ASSIGN(AshWindowManager);
};
} // namespace ash
#endif // ASH_WS_ASH_WINDOW_MANAGER_H_