Chromium Code Reviews| 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 UI_GFX_SCREEN_H_ | 5 #ifndef UI_GFX_SCREEN_H_ |
| 6 #define UI_GFX_SCREEN_H_ | 6 #define UI_GFX_SCREEN_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 | 64 |
| 65 // Returns the number of displays. | 65 // Returns the number of displays. |
| 66 // Mirrored displays are excluded; this method is intended to return the | 66 // Mirrored displays are excluded; this method is intended to return the |
| 67 // number of distinct, usable displays. | 67 // number of distinct, usable displays. |
| 68 virtual int GetNumDisplays() const = 0; | 68 virtual int GetNumDisplays() const = 0; |
| 69 | 69 |
| 70 // Returns the list of displays that are currently available. | 70 // Returns the list of displays that are currently available. |
| 71 virtual std::vector<gfx::Display> GetAllDisplays() const = 0; | 71 virtual std::vector<gfx::Display> GetAllDisplays() const = 0; |
| 72 | 72 |
| 73 // Returns the display nearest the specified window. | 73 // Returns the display nearest the specified window. |
| 74 // If the window is NULL or the window is not rooted to a display this will | |
|
lazyboy
2014/10/02 16:16:21
I've added this comment, if that's what you meant.
| |
| 75 // return the primary display. | |
| 74 virtual gfx::Display GetDisplayNearestWindow(NativeView view) const = 0; | 76 virtual gfx::Display GetDisplayNearestWindow(NativeView view) const = 0; |
| 75 | 77 |
| 76 // Returns the display nearest the specified point. | 78 // Returns the display nearest the specified point. |
| 77 virtual gfx::Display GetDisplayNearestPoint( | 79 virtual gfx::Display GetDisplayNearestPoint( |
| 78 const gfx::Point& point) const = 0; | 80 const gfx::Point& point) const = 0; |
| 79 | 81 |
| 80 // Returns the display that most closely intersects the provided bounds. | 82 // Returns the display that most closely intersects the provided bounds. |
| 81 virtual gfx::Display GetDisplayMatching( | 83 virtual gfx::Display GetDisplayMatching( |
| 82 const gfx::Rect& match_rect) const = 0; | 84 const gfx::Rect& match_rect) const = 0; |
| 83 | 85 |
| 84 // Returns the primary display. | 86 // Returns the primary display. |
| 85 virtual gfx::Display GetPrimaryDisplay() const = 0; | 87 virtual gfx::Display GetPrimaryDisplay() const = 0; |
| 86 | 88 |
| 87 // Adds/Removes display observers. | 89 // Adds/Removes display observers. |
| 88 virtual void AddObserver(DisplayObserver* observer) = 0; | 90 virtual void AddObserver(DisplayObserver* observer) = 0; |
| 89 virtual void RemoveObserver(DisplayObserver* observer) = 0; | 91 virtual void RemoveObserver(DisplayObserver* observer) = 0; |
| 90 | 92 |
| 91 private: | 93 private: |
| 92 DISALLOW_COPY_AND_ASSIGN(Screen); | 94 DISALLOW_COPY_AND_ASSIGN(Screen); |
| 93 }; | 95 }; |
| 94 | 96 |
| 95 Screen* CreateNativeScreen(); | 97 Screen* CreateNativeScreen(); |
| 96 | 98 |
| 97 } // namespace gfx | 99 } // namespace gfx |
| 98 | 100 |
| 99 #endif // UI_GFX_SCREEN_H_ | 101 #endif // UI_GFX_SCREEN_H_ |
| OLD | NEW |