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

Unified Diff: ash/mus/window_manager_application.cc

Issue 2452783002: mash: remove AcceleratorRegistrar. (Closed)
Patch Set: Rebase to tot Created 4 years, 2 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/window_manager_application.h ('k') | services/ui/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager_application.cc
diff --git a/ash/mus/window_manager_application.cc b/ash/mus/window_manager_application.cc
index 338da2cf8de72d69ef5ee54dab84316dcd8548f2..7a12b157cdc65d73f73f0717142f620913cef65e 100644
--- a/ash/mus/window_manager_application.cc
+++ b/ash/mus/window_manager_application.cc
@@ -9,7 +9,6 @@
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/mojo_interface_factory.h"
#include "ash/common/wm_shell.h"
-#include "ash/mus/accelerators/accelerator_registrar_impl.h"
#include "ash/mus/native_widget_factory_mus.h"
#include "ash/mus/window_manager.h"
#include "base/bind.h"
@@ -45,13 +44,6 @@ WindowManagerApplication::WindowManagerApplication()
: screenlock_state_listener_binding_(this) {}
WindowManagerApplication::~WindowManagerApplication() {
- // AcceleratorRegistrarImpl removes an observer in its destructor. Destroy
- // it early on.
- std::set<AcceleratorRegistrarImpl*> accelerator_registrars(
- accelerator_registrars_);
- for (AcceleratorRegistrarImpl* registrar : accelerator_registrars)
- registrar->Destroy();
-
// Destroy the WindowManager while still valid. This way we ensure
// OnWillDestroyRootWindowController() is called (if it hasn't been already).
window_manager_.reset();
@@ -72,11 +64,6 @@ WindowManagerApplication::~WindowManagerApplication() {
ShutdownComponents();
}
-void WindowManagerApplication::OnAcceleratorRegistrarDestroyed(
- AcceleratorRegistrarImpl* registrar) {
- accelerator_registrars_.erase(registrar);
-}
-
void WindowManagerApplication::InitWindowManager(
std::unique_ptr<ui::WindowTreeClient> window_tree_client,
const scoped_refptr<base::SequencedWorkerPool>& blocking_pool) {
@@ -163,7 +150,6 @@ bool WindowManagerApplication::OnConnect(
mojo_interface_factory::RegisterInterfaces(
registry, base::ThreadTaskRunnerHandle::Get());
- registry->AddInterface<ui::mojom::AcceleratorRegistrar>(this);
if (remote_info.identity.name() == "service:mash_session") {
connector()->ConnectToInterface(remote_info.identity, &session_);
session_->AddScreenlockStateListener(
@@ -172,25 +158,6 @@ bool WindowManagerApplication::OnConnect(
return true;
}
-void WindowManagerApplication::Create(
- const service_manager::Identity& remote_identity,
- ui::mojom::AcceleratorRegistrarRequest request) {
- if (!window_manager_->window_manager_client())
- return; // Can happen during shutdown.
-
- uint16_t accelerator_namespace_id;
- if (!window_manager_->GetNextAcceleratorNamespaceId(
- &accelerator_namespace_id)) {
- DVLOG(1) << "Max number of accelerators registered, ignoring request.";
- // All ids are used. Normally shouldn't happen, so we close the connection.
- return;
- }
- accelerator_registrars_.insert(new AcceleratorRegistrarImpl(
- window_manager_.get(), accelerator_namespace_id, std::move(request),
- base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
- base::Unretained(this))));
-}
-
void WindowManagerApplication::ScreenlockStateChanged(bool locked) {
window_manager_->SetScreenLocked(locked);
}
« no previous file with comments | « ash/mus/window_manager_application.h ('k') | services/ui/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698