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_impl.h" | 10 #include "ui/gfx/screen.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 } | 14 } |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 | 17 |
18 // Aura implementation of gfx::Screen. Implemented here to avoid circular | 18 // Aura implementation of gfx::Screen. Implemented here to avoid circular |
19 // dependencies. | 19 // dependencies. |
20 class ASH_EXPORT ScreenAsh : public gfx::ScreenImpl { | 20 class ASH_EXPORT ScreenAsh : public gfx::Screen { |
21 public: | 21 public: |
22 ScreenAsh(); | 22 ScreenAsh(); |
23 virtual ~ScreenAsh(); | 23 virtual ~ScreenAsh(); |
24 | 24 |
25 // Finds the display that contains |point| in screeen coordinates. | 25 // Finds the display that contains |point| in screeen coordinates. |
26 // Returns invalid display if there is no display that can satisfy | 26 // Returns invalid display if there is no display that can satisfy |
27 // the condition. | 27 // the condition. |
28 static gfx::Display FindDisplayContainingPoint(const gfx::Point& point); | 28 static gfx::Display FindDisplayContainingPoint(const gfx::Point& point); |
29 | 29 |
30 // Returns the bounds for maximized windows in parent coordinates. | 30 // Returns the bounds for maximized windows in parent coordinates. |
(...skipping 18 matching lines...) Expand all Loading... |
49 // Converts |rect| from virtual screen coordinates to the |window|'s | 49 // Converts |rect| from virtual screen coordinates to the |window|'s |
50 // coordinates. | 50 // coordinates. |
51 static gfx::Rect ConvertRectFromScreen(aura::Window* window, | 51 static gfx::Rect ConvertRectFromScreen(aura::Window* window, |
52 const gfx::Rect& rect); | 52 const gfx::Rect& rect); |
53 | 53 |
54 // Returns a gfx::Display object for secondary display. Returns | 54 // Returns a gfx::Display object for secondary display. Returns |
55 // ivalid display if there is no secondary display connected. | 55 // ivalid display if there is no secondary display connected. |
56 static const gfx::Display& GetSecondaryDisplay(); | 56 static const gfx::Display& GetSecondaryDisplay(); |
57 | 57 |
58 protected: | 58 protected: |
| 59 |
| 60 // Implementation of gfx::Screen: |
| 61 virtual bool IsDIPEnabled() OVERRIDE; |
59 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 62 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
60 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; | 63 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
61 | 64 |
62 virtual int GetNumDisplays() OVERRIDE; | 65 virtual int GetNumDisplays() OVERRIDE; |
63 virtual gfx::Display GetDisplayNearestWindow( | 66 virtual gfx::Display GetDisplayNearestWindow( |
64 gfx::NativeView view) const OVERRIDE; | 67 gfx::NativeView view) const OVERRIDE; |
65 virtual gfx::Display GetDisplayNearestPoint( | 68 virtual gfx::Display GetDisplayNearestPoint( |
66 const gfx::Point& point) const OVERRIDE; | 69 const gfx::Point& point) const OVERRIDE; |
67 virtual gfx::Display GetDisplayMatching( | 70 virtual gfx::Display GetDisplayMatching( |
68 const gfx::Rect& match_rect) const OVERRIDE; | 71 const gfx::Rect& match_rect) const OVERRIDE; |
69 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 72 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; |
70 | 73 |
71 private: | 74 private: |
72 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); | 75 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); |
73 }; | 76 }; |
74 | 77 |
75 } // namespace ash | 78 } // namespace ash |
76 | 79 |
77 #endif // ASH_SCREEN_ASH_H_ | 80 #endif // ASH_SCREEN_ASH_H_ |
OLD | NEW |