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

Unified Diff: ash/accelerators/exit_warning_handler.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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/accelerators/accelerator_controller.cc ('k') | ash/app_list/app_list_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/exit_warning_handler.cc
diff --git a/ash/accelerators/exit_warning_handler.cc b/ash/accelerators/exit_warning_handler.cc
index 84f46b05ba424ad3e50505cff90d858c3fc7ccf9..7b8f3c5ac2a2cd4abffff98876e3ba5e3038df9f 100644
--- a/ash/accelerators/exit_warning_handler.cc
+++ b/ash/accelerators/exit_warning_handler.cc
@@ -144,9 +144,9 @@ void ExitWarningHandler::CancelTimer() {
void ExitWarningHandler::Show() {
if (widget_)
return;
- WmWindow* root_window = Shell::GetWmRootWindowForNewWindows();
+ aura::Window* root_window = Shell::GetRootWindowForNewWindows();
ExitWarningWidgetDelegateView* delegate = new ExitWarningWidgetDelegateView;
- gfx::Size rs = root_window->GetBounds().size();
+ gfx::Size rs = root_window->bounds().size();
gfx::Size ps = delegate->GetPreferredSize();
gfx::Rect bounds((rs.width() - ps.width()) / 2,
(rs.height() - ps.height()) / 3, ps.width(), ps.height());
@@ -161,8 +161,9 @@ void ExitWarningHandler::Show() {
params.bounds = bounds;
params.name = "ExitWarningWindow";
widget_.reset(new views::Widget);
- root_window->GetRootWindowController()->ConfigureWidgetInitParamsForContainer(
- widget_.get(), kShellWindowId_SettingBubbleContainer, &params);
+ GetRootWindowController(root_window)
+ ->ConfigureWidgetInitParamsForContainer(
+ widget_.get(), kShellWindowId_SettingBubbleContainer, &params);
widget_->Init(params);
widget_->Show();
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/app_list/app_list_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698