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

Side by Side Diff: ash/screen_ash.cc

Issue 10540123: Rename gfx::Screen::GetMonitorXXXX to gfx::Screen::GetDisplayXXX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/screen_ash.h ('k') | ash/screensaver/screensaver_view.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_ash.h" 5 #include "ash/screen_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/shelf_layout_manager.h" 8 #include "ash/wm/shelf_layout_manager.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 ScreenAsh::~ScreenAsh() { 27 ScreenAsh::~ScreenAsh() {
28 } 28 }
29 29
30 // static 30 // static
31 gfx::Rect ScreenAsh::GetMaximizedWindowBounds(aura::Window* window) { 31 gfx::Rect ScreenAsh::GetMaximizedWindowBounds(aura::Window* window) {
32 if (window->GetRootWindow() == Shell::GetPrimaryRootWindow()) 32 if (window->GetRootWindow() == Shell::GetPrimaryRootWindow())
33 return Shell::GetInstance()->shelf()->GetMaximizedWindowBounds(window); 33 return Shell::GetInstance()->shelf()->GetMaximizedWindowBounds(window);
34 else 34 else
35 return gfx::Screen::GetMonitorNearestWindow(window).bounds(); 35 return gfx::Screen::GetDisplayNearestWindow(window).bounds();
36 } 36 }
37 37
38 // static 38 // static
39 gfx::Rect ScreenAsh::GetUnmaximizedWorkAreaBounds(aura::Window* window) { 39 gfx::Rect ScreenAsh::GetUnmaximizedWorkAreaBounds(aura::Window* window) {
40 if (window->GetRootWindow() == Shell::GetPrimaryRootWindow()) 40 if (window->GetRootWindow() == Shell::GetPrimaryRootWindow())
41 return Shell::GetInstance()->shelf()->GetUnmaximizedWorkAreaBounds(window); 41 return Shell::GetInstance()->shelf()->GetUnmaximizedWorkAreaBounds(window);
42 else 42 else
43 return gfx::Screen::GetMonitorNearestWindow(window).work_area(); 43 return gfx::Screen::GetDisplayNearestWindow(window).work_area();
44 } 44 }
45 45
46 gfx::Point ScreenAsh::GetCursorScreenPoint() { 46 gfx::Point ScreenAsh::GetCursorScreenPoint() {
47 // TODO(oshima): Support multiple root window. 47 // TODO(oshima): Support multiple root window.
48 return Shell::GetPrimaryRootWindow()->last_mouse_location(); 48 return Shell::GetPrimaryRootWindow()->last_mouse_location();
49 } 49 }
50 50
51 gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPoint() { 51 gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPoint() {
52 const gfx::Point point = gfx::Screen::GetCursorScreenPoint(); 52 const gfx::Point point = gfx::Screen::GetCursorScreenPoint();
53 // TODO(oshima): convert point to relateive to the root window. 53 // TODO(oshima): convert point to relateive to the root window.
54 return Shell::GetRootWindowAt(point)->GetTopWindowContainingPoint(point); 54 return Shell::GetRootWindowAt(point)->GetTopWindowContainingPoint(point);
55 } 55 }
56 56
57 int ScreenAsh::GetNumMonitors() { 57 int ScreenAsh::GetNumDisplays() {
58 return GetMonitorManager()->GetNumMonitors(); 58 return GetMonitorManager()->GetNumDisplays();
59 } 59 }
60 60
61 gfx::Display ScreenAsh::GetMonitorNearestWindow(gfx::NativeView window) const { 61 gfx::Display ScreenAsh::GetDisplayNearestWindow(gfx::NativeView window) const {
62 return GetMonitorManager()->GetMonitorNearestWindow(window); 62 return GetMonitorManager()->GetDisplayNearestWindow(window);
63 } 63 }
64 64
65 gfx::Display ScreenAsh::GetMonitorNearestPoint(const gfx::Point& point) const { 65 gfx::Display ScreenAsh::GetDisplayNearestPoint(const gfx::Point& point) const {
66 return GetMonitorManager()->GetMonitorNearestPoint(point); 66 return GetMonitorManager()->GetDisplayNearestPoint(point);
67 } 67 }
68 68
69 gfx::Display ScreenAsh::GetPrimaryMonitor() const { 69 gfx::Display ScreenAsh::GetPrimaryDisplay() const {
70 return GetMonitorManager()->GetMonitorAt(0); 70 return GetMonitorManager()->GetDisplayAt(0);
71 } 71 }
72 72
73 } // namespace ash 73 } // namespace ash
OLDNEW
« no previous file with comments | « ash/screen_ash.h ('k') | ash/screensaver/screensaver_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698