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

Unified Diff: ash/mus/accelerator_registrar_impl.h

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 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 | « no previous file | ash/mus/accelerator_registrar_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/accelerator_registrar_impl.h
diff --git a/ash/mus/accelerator_registrar_impl.h b/ash/mus/accelerator_registrar_impl.h
index 695cca714be73263645cba19e11c5c2aedf859e9..e720674e1dd1a7b0f63ce7d5142a988a94d89d1e 100644
--- a/ash/mus/accelerator_registrar_impl.h
+++ b/ash/mus/accelerator_registrar_impl.h
@@ -9,7 +9,6 @@
#include <map>
-#include "ash/mus/root_windows_observer.h"
#include "base/callback.h"
#include "base/macros.h"
#include "components/mus/public/interfaces/accelerator_registrar.mojom.h"
@@ -19,17 +18,16 @@
namespace ash {
namespace mus {
-class WindowManagerApplication;
+class WindowManager;
// Manages AcceleratorHandlers from a particular AcceleratorRegistrar
// connection. This manages its own lifetime, and destroys itself when the
// AcceleratorRegistrar and all its AcceleratorHandlers are disconnected. Upon
// destruction, it calls the DestroyCallback.
-class AcceleratorRegistrarImpl : public ::mus::mojom::AcceleratorRegistrar,
- public RootWindowsObserver {
+class AcceleratorRegistrarImpl : public ::mus::mojom::AcceleratorRegistrar {
public:
using DestroyCallback = base::Callback<void(AcceleratorRegistrarImpl*)>;
- AcceleratorRegistrarImpl(WindowManagerApplication* wm_app,
+ AcceleratorRegistrarImpl(WindowManager* window_manager,
uint32_t accelerator_namespace,
mojo::InterfaceRequest<AcceleratorRegistrar> request,
const DestroyCallback& destroy_callback);
@@ -43,17 +41,12 @@ class AcceleratorRegistrarImpl : public ::mus::mojom::AcceleratorRegistrar,
void ProcessAccelerator(uint32_t accelerator_id, const ui::Event& event);
private:
- struct Accelerator;
-
~AcceleratorRegistrarImpl() override;
uint32_t ComputeAcceleratorId(uint32_t accelerator_id) const;
void OnBindingGone();
void OnHandlerGone();
- void AddAcceleratorToRoot(RootWindowController* root,
- uint32_t namespaced_accelerator_id);
-
void RemoveAllAccelerators();
// ::mus::mojom::AcceleratorRegistrar:
@@ -63,14 +56,11 @@ class AcceleratorRegistrarImpl : public ::mus::mojom::AcceleratorRegistrar,
const AddAcceleratorCallback& callback) override;
void RemoveAccelerator(uint32_t accelerator_id) override;
- // RootWindowsObserver:
- void OnRootWindowControllerAdded(RootWindowController* controller) override;
-
- WindowManagerApplication* wm_app_;
+ WindowManager* window_manager_;
::mus::mojom::AcceleratorHandlerPtr accelerator_handler_;
mojo::Binding<AcceleratorRegistrar> binding_;
uint32_t accelerator_namespace_;
- std::map<uint32_t, Accelerator> accelerators_;
+ std::set<uint32_t> accelerators_;
DestroyCallback destroy_callback_;
DISALLOW_COPY_AND_ASSIGN(AcceleratorRegistrarImpl);
« no previous file with comments | « no previous file | ash/mus/accelerator_registrar_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698