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

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

Issue 2895843002: chromeos: Eliminate WmWindow from //ash/system (Closed)
Patch Set: comments 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/system/palette/palette_tray.h ('k') | ash/system/palette/palette_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e36b6806b6e442c305a5cb5e4d5a66a040d59cdf 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())
->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 shelf()->GetWindow()->aura_window();
}
void PaletteTray::AnchorUpdated() {
« no previous file with comments | « ash/system/palette/palette_tray.h ('k') | ash/system/palette/palette_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698