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

Unified Diff: ash/shelf/shelf_widget.cc

Issue 2075923002: mash: Convert FocusCycler to wm common types and move to //ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_widget.cc
diff --git a/ash/shelf/shelf_widget.cc b/ash/shelf/shelf_widget.cc
index 28757a2ed26e404c356679080633f7e6e2f2430b..2425b78c4631e80cf7d36f626b62c3d0b3bd8774 100644
--- a/ash/shelf/shelf_widget.cc
+++ b/ash/shelf/shelf_widget.cc
@@ -7,6 +7,7 @@
#include "ash/ash_switches.h"
#include "ash/aura/wm_shelf_aura.h"
#include "ash/aura/wm_window_aura.h"
+#include "ash/common/focus_cycler.h"
#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/shelf_constants.h"
@@ -16,7 +17,6 @@
#include "ash/common/system/tray/system_tray_delegate.h"
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
-#include "ash/focus_cycler.h"
#include "ash/shelf/shelf_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shelf/shelf_navigator.h"
@@ -599,7 +599,7 @@ ShelfWidget::ShelfWidget(WmWindow* wm_shelf_container,
IsActiveUserSessionStarted()) {
status_area_widget_->Show();
}
- Shell::GetInstance()->focus_cycler()->AddWidget(status_area_widget_);
+ WmShell::Get()->focus_cycler()->AddWidget(status_area_widget_);
aura::Window* status_container =
WmWindowAura::GetAuraWindow(wm_status_container);
@@ -617,7 +617,7 @@ ShelfWidget::ShelfWidget(WmWindow* wm_shelf_container,
ShelfWidget::~ShelfWidget() {
// Must call Shutdown() before destruction.
DCHECK(!status_area_widget_);
- Shell::GetInstance()->focus_cycler()->RemoveWidget(this);
+ WmShell::Get()->focus_cycler()->RemoveWidget(this);
SetFocusCycler(nullptr);
RemoveObserver(this);
}
@@ -735,7 +735,7 @@ void ShelfWidget::CreateShelf(WmShelfAura* wm_shelf_aura) {
wm_shelf_aura->SetShelf(shelf_.get());
delegate->OnShelfCreated(shelf_.get());
- SetFocusCycler(shell->focus_cycler());
+ SetFocusCycler(WmShell::Get()->focus_cycler());
}
void ShelfWidget::PostCreateShelf() {
@@ -775,7 +775,7 @@ void ShelfWidget::Shutdown() {
shelf_layout_manager_->PrepareForShutdown();
if (status_area_widget_) {
- Shell::GetInstance()->focus_cycler()->RemoveWidget(status_area_widget_);
+ WmShell::Get()->focus_cycler()->RemoveWidget(status_area_widget_);
status_area_widget_->Shutdown();
status_area_widget_ = nullptr;
}
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698