| 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_impl.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 // Converts |rect| from |window|'s coordinates to the virtual screen | 44 // Converts |rect| from |window|'s coordinates to the virtual screen |
| 45 // coordinates. | 45 // coordinates. |
| 46 static gfx::Rect ConvertRectToScreen(aura::Window* window, | 46 static gfx::Rect ConvertRectToScreen(aura::Window* window, |
| 47 const gfx::Rect& rect); | 47 const gfx::Rect& rect); |
| 48 | 48 |
| 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 |
| 55 // ivalid display if there is no secondary display connected. |
| 56 static const gfx::Display& GetSecondaryDisplay(); |
| 57 |
| 54 protected: | 58 protected: |
| 55 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; | 59 virtual gfx::Point GetCursorScreenPoint() OVERRIDE; |
| 56 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; | 60 virtual gfx::NativeWindow GetWindowAtCursorScreenPoint() OVERRIDE; |
| 57 | 61 |
| 58 virtual int GetNumDisplays() OVERRIDE; | 62 virtual int GetNumDisplays() OVERRIDE; |
| 59 virtual gfx::Display GetDisplayNearestWindow( | 63 virtual gfx::Display GetDisplayNearestWindow( |
| 60 gfx::NativeView view) const OVERRIDE; | 64 gfx::NativeView view) const OVERRIDE; |
| 61 virtual gfx::Display GetDisplayNearestPoint( | 65 virtual gfx::Display GetDisplayNearestPoint( |
| 62 const gfx::Point& point) const OVERRIDE; | 66 const gfx::Point& point) const OVERRIDE; |
| 63 virtual gfx::Display GetDisplayMatching( | 67 virtual gfx::Display GetDisplayMatching( |
| 64 const gfx::Rect& match_rect) const OVERRIDE; | 68 const gfx::Rect& match_rect) const OVERRIDE; |
| 65 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; | 69 virtual gfx::Display GetPrimaryDisplay() const OVERRIDE; |
| 66 | 70 |
| 67 private: | 71 private: |
| 68 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); | 72 DISALLOW_COPY_AND_ASSIGN(ScreenAsh); |
| 69 }; | 73 }; |
| 70 | 74 |
| 71 } // namespace ash | 75 } // namespace ash |
| 72 | 76 |
| 73 #endif // ASH_SCREEN_ASH_H_ | 77 #endif // ASH_SCREEN_ASH_H_ |
| OLD | NEW |