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

Unified Diff: ash/common/wm_shell.cc

Issue 2187703003: Wires up registering accelerators from mash with the wm (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/common/accelerators/ash_focus_manager_factory.cc ('k') | ash/mus/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index 9af808d98e79e5aa93628501062be7e98a6d8ad1..53e4559bfe52d1390caf789b1a75af518c27eae8 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -7,6 +7,7 @@
#include <utility>
#include "ash/common/accelerators/accelerator_controller.h"
+#include "ash/common/accelerators/ash_focus_manager_factory.h"
#include "ash/common/accessibility_delegate.h"
#include "ash/common/focus_cycler.h"
#include "ash/common/keyboard/keyboard_ui.h"
@@ -30,6 +31,7 @@
#include "base/logging.h"
#include "ui/app_list/presenter/app_list_presenter.h"
#include "ui/display/display.h"
+#include "ui/views/focus/focus_manager_factory.h"
#if defined(OS_CHROMEOS)
#include "ash/common/system/chromeos/brightness/brightness_controller_chromeos.h"
@@ -61,6 +63,10 @@ void WmShell::Initialize() {
// Create the app list item in the shelf data model.
AppListShelfItemDelegate::CreateAppListItemAndDelegate(shelf_model_.get());
+
+ // Install the custom factory early on so that views::FocusManagers for Tray,
+ // Shelf, and WallPaper could be created by the factory.
+ views::FocusManagerFactory::Install(new AshFocusManagerFactory);
}
void WmShell::Shutdown() {
@@ -71,6 +77,9 @@ void WmShell::Shutdown() {
shelf_model_->DestroyItemDelegates();
// Must be destroyed before FocusClient.
shelf_delegate_.reset();
+
+ // Balances the Install() in Initialize().
+ views::FocusManagerFactory::Install(nullptr);
}
void WmShell::OnMaximizeModeStarted() {
« no previous file with comments | « ash/common/accelerators/ash_focus_manager_factory.cc ('k') | ash/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698