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

Unified Diff: ash/mus/window_manager.h

Issue 2171973003: Separates out accelerator handling in windowmanager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 5 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 | « ash/mus/accelerators/accelerator_registrar_unittest.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.h
diff --git a/ash/mus/window_manager.h b/ash/mus/window_manager.h
index 515f4f926275f8dbbf30d0a5792ca0c95a55f59c..98730e1e6c218425a0de8b7a23a9510cf5951d0b 100644
--- a/ash/mus/window_manager.h
+++ b/ash/mus/window_manager.h
@@ -30,6 +30,7 @@ class Connector;
namespace ash {
namespace mus {
+class AcceleratorHandler;
class RootWindowController;
class ShadowController;
class WindowManagerObserver;
@@ -68,14 +69,19 @@ class WindowManager : public ::ui::WindowManagerDelegate,
std::set<RootWindowController*> GetRootWindowControllers();
+ // Returns the next accelerator namespace id by value in |id|. Returns true
+ // if there is another slot available, false if all slots are taken up.
+ bool GetNextAcceleratorNamespaceId(uint16_t* id);
+ void AddAcceleratorHandler(uint16_t id_namespace,
+ AcceleratorHandler* handler);
+ void RemoveAcceleratorHandler(uint16_t id_namespace);
+
void AddObserver(WindowManagerObserver* observer);
void RemoveObserver(WindowManagerObserver* observer);
private:
friend class WmTestHelper;
- void AddAccelerators();
-
RootWindowController* CreateRootWindowController(
::ui::Window* window,
const display::Display& display);
@@ -128,6 +134,9 @@ class WindowManager : public ::ui::WindowManagerDelegate,
std::unique_ptr<WmLookupMus> lookup_;
+ std::map<uint16_t, AcceleratorHandler*> accelerator_handlers_;
+ uint16_t next_accelerator_namespace_id_ = 0u;
+
DISALLOW_COPY_AND_ASSIGN(WindowManager);
};
« no previous file with comments | « ash/mus/accelerators/accelerator_registrar_unittest.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698