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

Side by Side Diff: mash/wm/window_manager_application.h

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « mash/wm/root_window_controller.cc ('k') | mash/wm/window_manager_application.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 MASH_WM_WINDOW_MANAGER_APPLICATION_H_ 5 #ifndef MASH_WM_WINDOW_MANAGER_APPLICATION_H_
6 #define MASH_WM_WINDOW_MANAGER_APPLICATION_H_ 6 #define MASH_WM_WINDOW_MANAGER_APPLICATION_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 29 matching lines...) Expand all
40 40
41 namespace mash { 41 namespace mash {
42 namespace wm { 42 namespace wm {
43 43
44 class AcceleratorRegistrarImpl; 44 class AcceleratorRegistrarImpl;
45 class RootWindowController; 45 class RootWindowController;
46 class RootWindowsObserver; 46 class RootWindowsObserver;
47 class UserWindowControllerImpl; 47 class UserWindowControllerImpl;
48 48
49 class WindowManagerApplication 49 class WindowManagerApplication
50 : public mojo::ShellClient, 50 : public shell::ShellClient,
51 public mus::mojom::WindowManagerFactory, 51 public mus::mojom::WindowManagerFactory,
52 public mojo::InterfaceFactory<mash::wm::mojom::UserWindowController>, 52 public shell::InterfaceFactory<mash::wm::mojom::UserWindowController>,
53 public mojo::InterfaceFactory<mus::mojom::AcceleratorRegistrar> { 53 public shell::InterfaceFactory<mus::mojom::AcceleratorRegistrar> {
54 public: 54 public:
55 WindowManagerApplication(); 55 WindowManagerApplication();
56 ~WindowManagerApplication() override; 56 ~WindowManagerApplication() override;
57 57
58 mojo::Connector* connector() { return connector_; } 58 shell::Connector* connector() { return connector_; }
59 59
60 // Returns the RootWindowControllers that have valid roots. 60 // Returns the RootWindowControllers that have valid roots.
61 // 61 //
62 // NOTE: this does not return |controllers_| as most clients want a 62 // NOTE: this does not return |controllers_| as most clients want a
63 // RootWindowController that has a valid root window. 63 // RootWindowController that has a valid root window.
64 std::set<RootWindowController*> GetRootControllers(); 64 std::set<RootWindowController*> GetRootControllers();
65 65
66 // Called when the root window of |root_controller| is obtained. 66 // Called when the root window of |root_controller| is obtained.
67 void OnRootWindowControllerGotRoot(RootWindowController* root_controller); 67 void OnRootWindowControllerGotRoot(RootWindowController* root_controller);
68 68
(...skipping 10 matching lines...) Expand all
79 void AddRootWindowsObserver(RootWindowsObserver* observer); 79 void AddRootWindowsObserver(RootWindowsObserver* observer);
80 void RemoveRootWindowsObserver(RootWindowsObserver* observer); 80 void RemoveRootWindowsObserver(RootWindowsObserver* observer);
81 81
82 session::mojom::Session* session() { 82 session::mojom::Session* session() {
83 return session_.get(); 83 return session_.get();
84 } 84 }
85 85
86 private: 86 private:
87 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); 87 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar);
88 88
89 // mojo::ShellClient: 89 // shell::ShellClient:
90 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, 90 void Initialize(shell::Connector* connector,
91 const shell::Identity& identity,
91 uint32_t id) override; 92 uint32_t id) override;
92 bool AcceptConnection(mojo::Connection* connection) override; 93 bool AcceptConnection(shell::Connection* connection) override;
93 94
94 // InterfaceFactory<mash::wm::mojom::UserWindowController>: 95 // InterfaceFactory<mash::wm::mojom::UserWindowController>:
95 void Create(mojo::Connection* connection, 96 void Create(shell::Connection* connection,
96 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> 97 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>
97 request) override; 98 request) override;
98 99
99 // InterfaceFactory<mus::mojom::AcceleratorRegistrar>: 100 // InterfaceFactory<mus::mojom::AcceleratorRegistrar>:
100 void Create(mojo::Connection* connection, 101 void Create(shell::Connection* connection,
101 mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request) 102 mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request)
102 override; 103 override;
103 104
104 // mus::mojom::WindowManagerFactory: 105 // mus::mojom::WindowManagerFactory:
105 void CreateWindowManager(mus::mojom::DisplayPtr display, 106 void CreateWindowManager(mus::mojom::DisplayPtr display,
106 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> 107 mojo::InterfaceRequest<mus::mojom::WindowTreeClient>
107 client_request) override; 108 client_request) override;
108 109
109 mojo::Connector* connector_; 110 shell::Connector* connector_;
110 111
111 mojo::TracingImpl tracing_; 112 mojo::TracingImpl tracing_;
112 113
113 std::unique_ptr<ui::mojo::UIInit> ui_init_; 114 std::unique_ptr<ui::mojo::UIInit> ui_init_;
114 std::unique_ptr<views::AuraInit> aura_init_; 115 std::unique_ptr<views::AuraInit> aura_init_;
115 116
116 // |user_window_controller_| is created once OnEmbed() is called. Until that 117 // |user_window_controller_| is created once OnEmbed() is called. Until that
117 // time |user_window_controller_requests_| stores pending interface requests. 118 // time |user_window_controller_requests_| stores pending interface requests.
118 std::unique_ptr<UserWindowControllerImpl> user_window_controller_; 119 std::unique_ptr<UserWindowControllerImpl> user_window_controller_;
119 mojo::BindingSet<mash::wm::mojom::UserWindowController> 120 mojo::BindingSet<mash::wm::mojom::UserWindowController>
(...skipping 12 matching lines...) Expand all
132 133
133 base::ObserverList<RootWindowsObserver> root_windows_observers_; 134 base::ObserverList<RootWindowsObserver> root_windows_observers_;
134 135
135 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); 136 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication);
136 }; 137 };
137 138
138 } // namespace wm 139 } // namespace wm
139 } // namespace mash 140 } // namespace mash
140 141
141 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_ 142 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_
OLDNEW
« no previous file with comments | « mash/wm/root_window_controller.cc ('k') | mash/wm/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698