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

Unified Diff: ash/wm/default_state.cc

Issue 1608053002: Remove now-unnecessary wrappers around gfx::Screen::GetScreen() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-5
Patch Set: cros Created 4 years, 11 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/wm/coordinate_conversion.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_state.cc
diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc
index c1897e65a610ee040b68523b5d4e5580774c126c..c5a1972dedaf34bbf155961362191fcd128e7070 100644
--- a/ash/wm/default_state.cc
+++ b/ash/wm/default_state.cc
@@ -54,12 +54,13 @@ void MoveToDisplayForRestore(WindowState* window_state) {
// TODO(oshima): Restore information should contain the
// work area information like WindowResizer does for the
// last window location.
- gfx::Rect display_area = Shell::GetScreen()->GetDisplayNearestWindow(
- window_state->window()).bounds();
+ gfx::Rect display_area = gfx::Screen::GetScreen()
+ ->GetDisplayNearestWindow(window_state->window())
+ .bounds();
if (!display_area.Intersects(restore_bounds)) {
const gfx::Display& display =
- Shell::GetScreen()->GetDisplayMatching(restore_bounds);
+ gfx::Screen::GetScreen()->GetDisplayMatching(restore_bounds);
WindowTreeHostManager* window_tree_host_manager =
Shell::GetInstance()->window_tree_host_manager();
aura::Window* new_root =
@@ -260,8 +261,8 @@ void DefaultState::AttachState(
// If the display has changed while in the another mode,
// we need to let windows know the change.
- gfx::Display current_display = Shell::GetScreen()->
- GetDisplayNearestWindow(window_state->window());
+ gfx::Display current_display =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window_state->window());
if (stored_display_state_.bounds() != current_display.bounds()) {
const WMEvent event(wm::WM_EVENT_DISPLAY_BOUNDS_CHANGED);
window_state->OnWMEvent(&event);
@@ -281,8 +282,8 @@ void DefaultState::DetachState(WindowState* window_state) {
// while in the other mode, we can perform necessary action to
// restore the window state to the proper state for the current
// display.
- stored_display_state_ = Shell::GetScreen()->
- GetDisplayNearestWindow(window_state->window());
+ stored_display_state_ =
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window_state->window());
}
// static
@@ -739,7 +740,7 @@ void DefaultState::CenterWindow(WindowState* window_state) {
aura::Window* window = window_state->window();
if (window_state->IsSnapped()) {
gfx::Rect center_in_screen =
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area();
+ gfx::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area();
gfx::Size size = window_state->HasRestoreBounds() ?
window_state->GetRestoreBoundsInScreen().size() :
window->bounds().size();
« no previous file with comments | « ash/wm/coordinate_conversion.cc ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698