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

Unified Diff: mash/wm/window_manager_application.h

Issue 1656123002: Moves accelerator registration to WindowManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mandoline Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/wm/window_manager.cc ('k') | mash/wm/window_manager_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/window_manager_application.h
diff --git a/mash/wm/window_manager_application.h b/mash/wm/window_manager_application.h
index cd6282f31ac97bd2db76c4bae98d8ccc1553ef83..ffe0603b23d0efd773b8e6664b6a30caa7fdd3ee 100644
--- a/mash/wm/window_manager_application.h
+++ b/mash/wm/window_manager_application.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
+#include "base/observer_list.h"
#include "components/mus/common/types.h"
#include "components/mus/public/interfaces/accelerator_registrar.mojom.h"
#include "components/mus/public/interfaces/window_manager.mojom.h"
@@ -38,6 +39,7 @@ namespace wm {
class AcceleratorRegistrarImpl;
class RootWindowController;
+class RootWindowsObserver;
class UserWindowControllerImpl;
class WindowManagerApplication
@@ -51,6 +53,12 @@ class WindowManagerApplication
mojo::ApplicationImpl* app() { return app_; }
+ // Returns the RootWindowControllers that have valid roots.
+ //
+ // NOTE: this does not return |controllers_| as most clients want a
+ // RootWindowController that has a valid root window.
+ std::set<RootWindowController*> GetRootControllers();
+
// Called when the root window of |root_controller| is obtained.
void OnRootWindowControllerGotRoot(RootWindowController* root_controller);
@@ -64,6 +72,9 @@ class WindowManagerApplication
// TODO(sky): figure out right place for this code.
void OnAccelerator(uint32_t id, mus::mojom::EventPtr event);
+ void AddRootWindowsObserver(RootWindowsObserver* observer);
+ void RemoveRootWindowsObserver(RootWindowsObserver* observer);
+
private:
void OnAcceleratorRegistrarDestroyed(AcceleratorRegistrarImpl* registrar);
@@ -109,6 +120,8 @@ class WindowManagerApplication
mojo::Binding<mus::mojom::WindowManagerFactory>
window_manager_factory_binding_;
+ base::ObserverList<RootWindowsObserver> root_windows_observers_;
+
DISALLOW_COPY_AND_ASSIGN(WindowManagerApplication);
};
« no previous file with comments | « mash/wm/window_manager.cc ('k') | mash/wm/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698