Chromium Code Reviews| Index: ash/system/palette/palette_tray.cc |
| diff --git a/ash/system/palette/palette_tray.cc b/ash/system/palette/palette_tray.cc |
| index ead0f4b4b7c5ff590c1e4c22979fd202c9d4403c..8257a96cdbe9fbfe74e34e5715f369512247b11f 100644 |
| --- a/ash/system/palette/palette_tray.cc |
| +++ b/ash/system/palette/palette_tray.cc |
| @@ -27,6 +27,7 @@ |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/display/display.h" |
| +#include "ui/display/screen.h" |
| #include "ui/events/devices/input_device_manager.h" |
| #include "ui/events/devices/stylus_state.h" |
| #include "ui/gfx/color_palette.h" |
| @@ -72,8 +73,8 @@ bool IsInUserSession() { |
| // display if requested from the command line. |
| bool ShouldShowOnDisplay(PaletteTray* palette_tray) { |
| const display::Display& display = |
| - WmWindow::Get(palette_tray->GetWidget()->GetNativeWindow()) |
| - ->GetDisplayNearestWindow(); |
| + display::Screen::GetScreen()->GetDisplayNearestWindow( |
| + palette_tray->GetWidget()->GetNativeWindow()); |
| return display.IsInternal() || |
| palette_utils::IsPaletteEnabledOnEveryDisplay(); |
| } |
| @@ -308,8 +309,7 @@ void PaletteTray::OnBeforeBubbleWidgetInit( |
| views::Widget* bubble_widget, |
| views::Widget::InitParams* params) const { |
| // Place the bubble in the same root window as |anchor_widget|. |
| - WmWindow::Get(anchor_widget->GetNativeWindow()) |
| - ->GetRootWindowController() |
| + RootWindowController::ForWindow(anchor_widget->GetNativeWindow()) |
|
msw
2017/05/22 18:37:11
aside: We should consolidate that with ash::GetRoo
James Cook
2017/05/22 21:04:54
Yeah. I think we should eliminate ash::GetRootWind
|
| ->ConfigureWidgetInitParamsForContainer( |
| bubble_widget, kShellWindowId_SettingBubbleContainer, params); |
| } |
| @@ -358,8 +358,8 @@ void PaletteTray::OnActiveToolChanged() { |
| UpdateTrayIcon(); |
| } |
| -WmWindow* PaletteTray::GetWindow() { |
| - return shelf()->GetWindow(); |
| +aura::Window* PaletteTray::GetWindow() { |
| + return WmWindow::GetAuraWindow(shelf()->GetWindow()); |
|
msw
2017/05/22 18:37:11
ditto optional nit: ->aura_window()
James Cook
2017/05/22 21:04:54
Done.
|
| } |
| void PaletteTray::AnchorUpdated() { |