Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: ash/mus/root_window_controller.h

Issue 2182633011: Replaces ::ui:: with ui:: in ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/property_util.cc ('k') | ash/mus/root_window_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ASH_MUS_ROOT_WINDOW_CONTROLLER_H_ 5 #ifndef ASH_MUS_ROOT_WINDOW_CONTROLLER_H_
6 #define ASH_MUS_ROOT_WINDOW_CONTROLLER_H_ 6 #define ASH_MUS_ROOT_WINDOW_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "ash/mus/disconnected_app_handler.h" 10 #include "ash/mus/disconnected_app_handler.h"
(...skipping 19 matching lines...) Expand all
30 class ShelfLayoutManager; 30 class ShelfLayoutManager;
31 class StatusLayoutManager; 31 class StatusLayoutManager;
32 class WindowManager; 32 class WindowManager;
33 class WmRootWindowControllerMus; 33 class WmRootWindowControllerMus;
34 class WmShelfMus; 34 class WmShelfMus;
35 class WmTestBase; 35 class WmTestBase;
36 class WmTestHelper; 36 class WmTestHelper;
37 class WmWindowMus; 37 class WmWindowMus;
38 38
39 // RootWindowController manages the windows and state for a single display. 39 // RootWindowController manages the windows and state for a single display.
40 // RootWindowController is tied to the lifetime of the ::ui::Window it is 40 // RootWindowController is tied to the lifetime of the ui::Window it is
41 // created with. It is assumed the RootWindowController is deleted once the 41 // created with. It is assumed the RootWindowController is deleted once the
42 // associated ::ui::Window is destroyed. 42 // associated ui::Window is destroyed.
43 class RootWindowController : public ShelfLayoutManagerDelegate { 43 class RootWindowController : public ShelfLayoutManagerDelegate {
44 public: 44 public:
45 RootWindowController(WindowManager* window_manager, 45 RootWindowController(WindowManager* window_manager,
46 ::ui::Window* root, 46 ui::Window* root,
47 const display::Display& display); 47 const display::Display& display);
48 ~RootWindowController() override; 48 ~RootWindowController() override;
49 49
50 shell::Connector* GetConnector(); 50 shell::Connector* GetConnector();
51 51
52 ::ui::Window* root() { return root_; } 52 ui::Window* root() { return root_; }
53 53
54 int window_count() { return window_count_; } 54 int window_count() { return window_count_; }
55 55
56 ::ui::Window* NewTopLevelWindow( 56 ui::Window* NewTopLevelWindow(
57 std::map<std::string, std::vector<uint8_t>>* properties); 57 std::map<std::string, std::vector<uint8_t>>* properties);
58 58
59 ::ui::Window* GetWindowForContainer(mojom::Container container); 59 ui::Window* GetWindowForContainer(mojom::Container container);
60 60
61 WmWindowMus* GetWindowByShellWindowId(int id); 61 WmWindowMus* GetWindowByShellWindowId(int id);
62 62
63 WindowManager* window_manager() { return window_manager_; } 63 WindowManager* window_manager() { return window_manager_; }
64 64
65 const display::Display& display() const { return display_; } 65 const display::Display& display() const { return display_; }
66 66
67 ShelfLayoutManager* GetShelfLayoutManager(); 67 ShelfLayoutManager* GetShelfLayoutManager();
68 StatusLayoutManager* GetStatusLayoutManager(); 68 StatusLayoutManager* GetStatusLayoutManager();
69 WorkspaceLayoutManager* workspace_layout_manager() { 69 WorkspaceLayoutManager* workspace_layout_manager() {
70 return workspace_layout_manager_; 70 return workspace_layout_manager_;
71 } 71 }
72 72
73 AlwaysOnTopController* always_on_top_controller() { 73 AlwaysOnTopController* always_on_top_controller() {
74 return always_on_top_controller_.get(); 74 return always_on_top_controller_.get();
75 } 75 }
76 76
77 WmShelfMus* wm_shelf() { return wm_shelf_.get(); } 77 WmShelfMus* wm_shelf() { return wm_shelf_.get(); }
78 78
79 private: 79 private:
80 friend class WmTestBase; 80 friend class WmTestBase;
81 friend class WmTestHelper; 81 friend class WmTestHelper;
82 82
83 gfx::Rect CalculateDefaultBounds(::ui::Window* window) const; 83 gfx::Rect CalculateDefaultBounds(ui::Window* window) const;
84 gfx::Rect GetMaximizedWindowBounds() const; 84 gfx::Rect GetMaximizedWindowBounds() const;
85 85
86 // ShelfLayoutManagerDelegate: 86 // ShelfLayoutManagerDelegate:
87 void OnShelfWindowAvailable() override; 87 void OnShelfWindowAvailable() override;
88 88
89 // Creates the necessary set of layout managers in the shell windows. 89 // Creates the necessary set of layout managers in the shell windows.
90 void CreateLayoutManagers(); 90 void CreateLayoutManagers();
91 91
92 WindowManager* window_manager_; 92 WindowManager* window_manager_;
93 ::ui::Window* root_; 93 ui::Window* root_;
94 int window_count_ = 0; 94 int window_count_ = 0;
95 95
96 display::Display display_; 96 display::Display display_;
97 97
98 std::unique_ptr<RootWindowControllerCommon> root_window_controller_common_; 98 std::unique_ptr<RootWindowControllerCommon> root_window_controller_common_;
99 99
100 std::unique_ptr<WmRootWindowControllerMus> wm_root_window_controller_; 100 std::unique_ptr<WmRootWindowControllerMus> wm_root_window_controller_;
101 std::unique_ptr<WmShelfMus> wm_shelf_; 101 std::unique_ptr<WmShelfMus> wm_shelf_;
102 102
103 // Owned by the corresponding container. 103 // Owned by the corresponding container.
104 WorkspaceLayoutManager* workspace_layout_manager_ = nullptr; 104 WorkspaceLayoutManager* workspace_layout_manager_ = nullptr;
105 std::map<::ui::Window*, std::unique_ptr<LayoutManager>> layout_managers_; 105 std::map<ui::Window*, std::unique_ptr<LayoutManager>> layout_managers_;
106 106
107 std::unique_ptr<AlwaysOnTopController> always_on_top_controller_; 107 std::unique_ptr<AlwaysOnTopController> always_on_top_controller_;
108 108
109 std::unique_ptr<DisconnectedAppHandler> disconnected_app_handler_; 109 std::unique_ptr<DisconnectedAppHandler> disconnected_app_handler_;
110 110
111 DISALLOW_COPY_AND_ASSIGN(RootWindowController); 111 DISALLOW_COPY_AND_ASSIGN(RootWindowController);
112 }; 112 };
113 113
114 } // namespace mus 114 } // namespace mus
115 } // namespace ash 115 } // namespace ash
116 116
117 #endif // ASH_MUS_ROOT_WINDOW_CONTROLLER_H_ 117 #endif // ASH_MUS_ROOT_WINDOW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/mus/property_util.cc ('k') | ash/mus/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698