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

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

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 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/wallpaper/wallpaper.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 <set> 10 #include <set>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "components/mus/common/types.h" 15 #include "components/mus/common/types.h"
16 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h" 16 #include "components/mus/public/interfaces/accelerator_registrar.mojom.h"
17 #include "components/mus/public/interfaces/window_manager.mojom.h" 17 #include "components/mus/public/interfaces/window_manager.mojom.h"
18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h" 18 #include "components/mus/public/interfaces/window_manager_factory.mojom.h"
19 #include "components/mus/public/interfaces/window_tree_host.mojom.h" 19 #include "components/mus/public/interfaces/window_tree_host.mojom.h"
20 #include "mash/wm/public/interfaces/user_window_controller.mojom.h" 20 #include "mash/wm/public/interfaces/user_window_controller.mojom.h"
21 #include "mojo/common/weak_binding_set.h" 21 #include "mojo/common/weak_binding_set.h"
22 #include "mojo/public/cpp/bindings/binding.h" 22 #include "mojo/public/cpp/bindings/binding.h"
23 #include "mojo/services/tracing/public/cpp/tracing_impl.h" 23 #include "mojo/services/tracing/public/cpp/tracing_impl.h"
24 #include "mojo/shell/public/cpp/application_delegate.h" 24 #include "mojo/shell/public/cpp/shell_client.h"
25 25
26 namespace ui { 26 namespace ui {
27 namespace mojo { 27 namespace mojo {
28 class UIInit; 28 class UIInit;
29 } 29 }
30 } 30 }
31 31
32 namespace views { 32 namespace views {
33 class AuraInit; 33 class AuraInit;
34 } 34 }
35 35
36 namespace mash { 36 namespace mash {
37 namespace wm { 37 namespace wm {
38 38
39 class AcceleratorRegistrarImpl; 39 class AcceleratorRegistrarImpl;
40 class RootWindowController; 40 class RootWindowController;
41 class RootWindowsObserver; 41 class RootWindowsObserver;
42 class UserWindowControllerImpl; 42 class UserWindowControllerImpl;
43 43
44 class WindowManagerApplication 44 class WindowManagerApplication
45 : public mojo::ApplicationDelegate, 45 : public mojo::ShellClient,
46 public mus::mojom::WindowManagerFactory, 46 public mus::mojom::WindowManagerFactory,
47 public mojo::InterfaceFactory<mash::wm::mojom::UserWindowController>, 47 public mojo::InterfaceFactory<mash::wm::mojom::UserWindowController>,
48 public mojo::InterfaceFactory<mus::mojom::AcceleratorRegistrar> { 48 public mojo::InterfaceFactory<mus::mojom::AcceleratorRegistrar> {
49 public: 49 public:
50 WindowManagerApplication(); 50 WindowManagerApplication();
51 ~WindowManagerApplication() override; 51 ~WindowManagerApplication() override;
52 52
53 mojo::Shell* shell() { return shell_; } 53 mojo::Shell* shell() { return shell_; }
54 54
55 // Returns the RootWindowControllers that have valid roots. 55 // Returns the RootWindowControllers that have valid roots.
(...skipping 14 matching lines...) Expand all
70 70
71 // TODO(sky): figure out right place for this code. 71 // TODO(sky): figure out right place for this code.
72 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event); 72 void OnAccelerator(uint32_t id, mus::mojom::EventPtr event);
73 73
74 void AddRootWindowsObserver(RootWindowsObserver* observer); 74 void AddRootWindowsObserver(RootWindowsObserver* observer);
75 void RemoveRootWindowsObserver(RootWindowsObserver* observer); 75 void RemoveRootWindowsObserver(RootWindowsObserver* observer);
76 76
77 private: 77 private:
78 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar); 78 void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar);
79 79
80 // ApplicationDelegate: 80 // mojo::ShellClient:
81 void Initialize(mojo::Shell* shell, const std::string& url, 81 void Initialize(mojo::Shell* shell, const std::string& url,
82 uint32_t id) override; 82 uint32_t id) override;
83 bool AcceptConnection( 83 bool AcceptConnection(mojo::Connection* connection) override;
84 mojo::ApplicationConnection* connection) override;
85 84
86 // InterfaceFactory<mash::wm::mojom::UserWindowController>: 85 // InterfaceFactory<mash::wm::mojom::UserWindowController>:
87 void Create(mojo::ApplicationConnection* connection, 86 void Create(mojo::Connection* connection,
88 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController> 87 mojo::InterfaceRequest<mash::wm::mojom::UserWindowController>
89 request) override; 88 request) override;
90 89
91 // InterfaceFactory<mus::mojom::AcceleratorRegistrar>: 90 // InterfaceFactory<mus::mojom::AcceleratorRegistrar>:
92 void Create(mojo::ApplicationConnection* connection, 91 void Create(mojo::Connection* connection,
93 mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request) 92 mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request)
94 override; 93 override;
95 94
96 // mus::mojom::WindowManagerFactory: 95 // mus::mojom::WindowManagerFactory:
97 void CreateWindowManager(mus::mojom::DisplayPtr display, 96 void CreateWindowManager(mus::mojom::DisplayPtr display,
98 mojo::InterfaceRequest<mus::mojom::WindowTreeClient> 97 mojo::InterfaceRequest<mus::mojom::WindowTreeClient>
99 client_request) override; 98 client_request) override;
100 99
101 mojo::Shell* shell_; 100 mojo::Shell* shell_;
102 101
(...skipping 19 matching lines...) Expand all
122 121
123 base::ObserverList<RootWindowsObserver> root_windows_observers_; 122 base::ObserverList<RootWindowsObserver> root_windows_observers_;
124 123
125 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication); 124 DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication);
126 }; 125 };
127 126
128 } // namespace wm 127 } // namespace wm
129 } // namespace mash 128 } // namespace mash
130 129
131 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_ 130 #endif // MASH_WM_WINDOW_MANAGER_APPLICATION_H_
OLDNEW
« no previous file with comments | « mash/wallpaper/wallpaper.cc ('k') | mash/wm/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698