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

Unified Diff: ash/shell.cc

Issue 2170753005: Moves AcceleratorController from Shell to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no-find-copies 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
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 3e63c8e42588398a432333b8c85605f893da09ed..05b97d87ed54d809030d8904fcbe41428003c90f 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -883,8 +883,11 @@ void Shell::Init(const ShellInitParams& init_params) {
display::Screen::GetScreen()->GetPrimaryDisplay());
accelerator_controller_delegate_.reset(new AcceleratorControllerDelegateAura);
- accelerator_controller_.reset(
- new AcceleratorController(accelerator_controller_delegate_.get()));
+ {
+ std::unique_ptr<AcceleratorController> accelerator_controller(
+ new AcceleratorController(accelerator_controller_delegate_.get()));
+ wm_shell_->SetAcceleratorController(std::move(accelerator_controller));
+ }
James Cook 2016/07/21 21:20:49 Q: Why does this need to be in its own scope?
sky 2016/07/21 21:31:56 It doesn't. I went with the scoping because of the
wm_shell_->CreateMaximizeModeController();
AddPreTargetHandler(window_tree_host_manager_->input_method_event_handler());
@@ -908,7 +911,7 @@ void Shell::Init(const ShellInitParams& init_params) {
accelerator_filter_.reset(new ::wm::AcceleratorFilter(
std::unique_ptr<::wm::AcceleratorDelegate>(new AcceleratorDelegate),
- accelerator_controller_->accelerator_history()));
+ wm_shell_->accelerator_controller()->accelerator_history()));
AddPreTargetHandler(accelerator_filter_.get());
event_transformation_handler_.reset(new EventTransformationHandler);

Powered by Google App Engine
This is Rietveld 408576698