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

Side by Side Diff: ash/screen_util.cc

Issue 2626483002: Removes WmShelfAura and WmShelfMus (Closed)
Patch Set: merge Created 3 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 unified diff | Download patch
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/screen_util.h" 5 #include "ash/screen_util.h"
6 6
7 #include "ash/aura/wm_shelf_aura.h" 7 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "ui/aura/client/screen_position_client.h" 11 #include "ui/aura/client/screen_position_client.h"
12 #include "ui/aura/window_event_dispatcher.h" 12 #include "ui/aura/window_event_dispatcher.h"
13 #include "ui/display/display.h" 13 #include "ui/display/display.h"
14 #include "ui/display/manager/display_manager.h" 14 #include "ui/display/manager/display_manager.h"
15 #include "ui/display/screen.h" 15 #include "ui/display/screen.h"
16 #include "ui/gfx/geometry/size_conversions.h" 16 #include "ui/gfx/geometry/size_conversions.h"
17 17
18 namespace ash { 18 namespace ash {
19 19
20 // static 20 // static
21 gfx::Rect ScreenUtil::GetMaximizedWindowBoundsInParent(aura::Window* window) { 21 gfx::Rect ScreenUtil::GetMaximizedWindowBoundsInParent(aura::Window* window) {
22 aura::Window* root_window = window->GetRootWindow(); 22 aura::Window* root_window = window->GetRootWindow();
23 if (GetRootWindowController(root_window)->wm_shelf_aura()->shelf_widget()) 23 if (GetRootWindowController(root_window)->wm_shelf()->shelf_widget())
24 return GetDisplayWorkAreaBoundsInParent(window); 24 return GetDisplayWorkAreaBoundsInParent(window);
25 else 25 else
26 return GetDisplayBoundsInParent(window); 26 return GetDisplayBoundsInParent(window);
27 } 27 }
28 28
29 // static 29 // static
30 gfx::Rect ScreenUtil::GetDisplayBoundsInParent(aura::Window* window) { 30 gfx::Rect ScreenUtil::GetDisplayBoundsInParent(aura::Window* window) {
31 return ConvertRectFromScreen( 31 return ConvertRectFromScreen(
32 window->parent(), 32 window->parent(),
33 display::Screen::GetScreen()->GetDisplayNearestWindow(window).bounds()); 33 display::Screen::GetScreen()->GetDisplayNearestWindow(window).bounds());
(...skipping 21 matching lines...) Expand all
55 const gfx::Rect& rect) { 55 const gfx::Rect& rect) {
56 gfx::Point point = rect.origin(); 56 gfx::Point point = rect.origin();
57 aura::client::GetScreenPositionClient(window->GetRootWindow()) 57 aura::client::GetScreenPositionClient(window->GetRootWindow())
58 ->ConvertPointFromScreen(window, &point); 58 ->ConvertPointFromScreen(window, &point);
59 return gfx::Rect(point, rect.size()); 59 return gfx::Rect(point, rect.size());
60 } 60 }
61 61
62 // static 62 // static
63 63
64 } // namespace ash 64 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shelf/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698