OLD | NEW |
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/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/display/multi_display_manager.h" | 8 #include "ash/display/multi_display_manager.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 aura::client::GetScreenPositionClient(window->GetRootWindow())-> | 77 aura::client::GetScreenPositionClient(window->GetRootWindow())-> |
78 ConvertPointFromScreen(window, &point); | 78 ConvertPointFromScreen(window, &point); |
79 return gfx::Rect(point, rect.size()); | 79 return gfx::Rect(point, rect.size()); |
80 } | 80 } |
81 | 81 |
82 // static | 82 // static |
83 const gfx::Display& ScreenAsh::GetSecondaryDisplay() { | 83 const gfx::Display& ScreenAsh::GetSecondaryDisplay() { |
84 return *(Shell::GetInstance()->display_controller()->GetSecondaryDisplay()); | 84 return *(Shell::GetInstance()->display_controller()->GetSecondaryDisplay()); |
85 } | 85 } |
86 | 86 |
| 87 // static |
| 88 const gfx::Display& ScreenAsh::GetDisplayForId(int64 display_id) { |
| 89 return GetDisplayManager()->GetDisplayForId(display_id); |
| 90 } |
| 91 |
87 bool ScreenAsh::IsDIPEnabled() { | 92 bool ScreenAsh::IsDIPEnabled() { |
88 return true; | 93 return true; |
89 } | 94 } |
90 | 95 |
91 gfx::Point ScreenAsh::GetCursorScreenPoint() { | 96 gfx::Point ScreenAsh::GetCursorScreenPoint() { |
92 return aura::Env::GetInstance()->last_mouse_location(); | 97 return aura::Env::GetInstance()->last_mouse_location(); |
93 } | 98 } |
94 | 99 |
95 gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPoint() { | 100 gfx::NativeWindow ScreenAsh::GetWindowAtCursorScreenPoint() { |
96 const gfx::Point point = Shell::GetScreen()->GetCursorScreenPoint(); | 101 const gfx::Point point = Shell::GetScreen()->GetCursorScreenPoint(); |
(...skipping 14 matching lines...) Expand all Loading... |
111 | 116 |
112 gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const { | 117 gfx::Display ScreenAsh::GetDisplayMatching(const gfx::Rect& match_rect) const { |
113 return GetDisplayManager()->GetDisplayMatching(match_rect); | 118 return GetDisplayManager()->GetDisplayMatching(match_rect); |
114 } | 119 } |
115 | 120 |
116 gfx::Display ScreenAsh::GetPrimaryDisplay() const { | 121 gfx::Display ScreenAsh::GetPrimaryDisplay() const { |
117 return DisplayController::GetPrimaryDisplay(); | 122 return DisplayController::GetPrimaryDisplay(); |
118 } | 123 } |
119 | 124 |
120 } // namespace ash | 125 } // namespace ash |
OLD | NEW |