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 #ifndef ASH_SCREEN_ASH_H_ | 5 #ifndef ASH_SCREEN_ASH_H_ |
6 #define ASH_SCREEN_ASH_H_ | 6 #define ASH_SCREEN_ASH_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/gfx/screen.h" | 10 #include "ui/gfx/screen.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 // coordinates. | 41 // coordinates. |
42 static gfx::Rect ConvertRectToScreen(aura::Window* window, | 42 static gfx::Rect ConvertRectToScreen(aura::Window* window, |
43 const gfx::Rect& rect); | 43 const gfx::Rect& rect); |
44 | 44 |
45 // Converts |rect| from virtual screen coordinates to the |window|'s | 45 // Converts |rect| from virtual screen coordinates to the |window|'s |
46 // coordinates. | 46 // coordinates. |
47 static gfx::Rect ConvertRectFromScreen(aura::Window* window, | 47 static gfx::Rect ConvertRectFromScreen(aura::Window* window, |
48 const gfx::Rect& rect); | 48 const gfx::Rect& rect); |
49 | 49 |
50 // Returns a gfx::Display object for secondary display. Returns | 50 // Returns a gfx::Display object for secondary display. Returns |
51 // ivalid display if there is no secondary display connected. | 51 // invalid display if there is no secondary display connected. |
52 static const gfx::Display& GetSecondaryDisplay(); | 52 static const gfx::Display& GetSecondaryDisplay(); |
53 | 53 |
| 54 // Returns a gfx::Display object for the specified id. Returns |
| 55 // invalid display if no such display is connected. |
| 56 static const gfx::Display& GetDisplayForId(int64 display_id); |
| 57 |
54 protected: | 58 protected: |
55 | 59 |
56 // Implementation of gfx::Screen: | 60 // Implementation of gfx::Screen: |
57 virtual bool IsDIPEnabled() OVERRIDE; | 61 virtual bool IsDIPEnabled() OVERRIDE; |
58 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 62 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
59 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; | 63 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
60 | 64 |
61 virtual int GetNumDisplays() OVERRIDE; | 65 virtual int GetNumDisplays() OVERRIDE; |
62 virtual gfx::Display GetDisplayNearestWindow( | 66 virtual gfx::Display GetDisplayNearestWindow( |
63 gfx::NativeView view) const OVERRIDE; | 67 gfx::NativeView view) const OVERRIDE; |
64 virtual gfx::Display GetDisplayNearestPoint( | 68 virtual gfx::Display GetDisplayNearestPoint( |
65 const gfx::Point& point) const OVERRIDE; | 69 const gfx::Point& point) const OVERRIDE; |
66 virtual gfx::Display GetDisplayMatching( | 70 virtual gfx::Display GetDisplayMatching( |
67 const gfx::Rect& match_rect) const OVERRIDE; | 71 const gfx::Rect& match_rect) const OVERRIDE; |
68 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 72 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; |
69 | 73 |
70 private: | 74 private: |
71 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); | 75 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); |
72 }; | 76 }; |
73 | 77 |
74 } // namespace ash | 78 } // namespace ash |
75 | 79 |
76 #endif // ASH_SCREEN_ASH_H_ | 80 #endif // ASH_SCREEN_ASH_H_ |
OLD | NEW |