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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 virtual gfx::Display GetDisplayNearestWindow(NativeView view) const = 0; | 74 virtual gfx::Display GetDisplayNearestWindow(NativeView view) const = 0; |
75 | 75 |
76 // Returns the ICC color profile data of the display nearest the window. | |
77 virtual bool GetDisplayColorProfile( | |
78 NativeView view, std::vector<char>* color_profile) const = 0; | |
sky
2014/05/07 16:38:35
I agree with Oshima on the wierdness of this API.
| |
79 | |
76 // Returns the display nearest the specified point. | 80 // Returns the display nearest the specified point. |
77 virtual gfx::Display GetDisplayNearestPoint( | 81 virtual gfx::Display GetDisplayNearestPoint( |
78 const gfx::Point& point) const = 0; | 82 const gfx::Point& point) const = 0; |
79 | 83 |
80 // Returns the display that most closely intersects the provided bounds. | 84 // Returns the display that most closely intersects the provided bounds. |
81 virtual gfx::Display GetDisplayMatching( | 85 virtual gfx::Display GetDisplayMatching( |
82 const gfx::Rect& match_rect) const = 0; | 86 const gfx::Rect& match_rect) const = 0; |
83 | 87 |
84 // Returns the primary display. | 88 // Returns the primary display. |
85 virtual gfx::Display GetPrimaryDisplay() const = 0; | 89 virtual gfx::Display GetPrimaryDisplay() const = 0; |
86 | 90 |
87 // Adds/Removes display observers. | 91 // Adds/Removes display observers. |
88 virtual void AddObserver(DisplayObserver* observer) = 0; | 92 virtual void AddObserver(DisplayObserver* observer) = 0; |
89 virtual void RemoveObserver(DisplayObserver* observer) = 0; | 93 virtual void RemoveObserver(DisplayObserver* observer) = 0; |
90 | 94 |
91 private: | 95 private: |
92 DISALLOW_COPY_AND_ASSIGN(Screen); | 96 DISALLOW_COPY_AND_ASSIGN(Screen); |
93 }; | 97 }; |
94 | 98 |
95 Screen* CreateNativeScreen(); | 99 Screen* CreateNativeScreen(); |
96 | 100 |
97 } // namespace gfx | 101 } // namespace gfx |
98 | 102 |
99 #endif // UI_GFX_SCREEN_H_ | 103 #endif // UI_GFX_SCREEN_H_ |
OLD | NEW |