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

Unified Diff: ash/system/palette/palette_tray.cc

Issue 2895843002: chromeos: Eliminate WmWindow from //ash/system (Closed)
Patch Set: 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
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() {

Powered by Google App Engine
This is Rietveld 408576698