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 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 color profile of the display nearest the window. | |
|
Ken Russell (switch to Gerrit)
2014/04/30 17:43:17
Could you add a little more documentation here? Wh
Noel Gordon
2014/04/30 17:51:29
Yeah good point. Would this work for you?
// Ret
Ken Russell (switch to Gerrit)
2014/04/30 17:52:02
Sounds good.
Noel Gordon
2014/05/01 05:24:55
Done.
| |
| 77 virtual bool GetDisplayColorProfile( | |
| 78 NativeView view, std::vector<char>* color_profile) const = 0; | |
|
oshima
2014/04/30 18:18:53
Can you define a class (or struct) for color profi
Noel Gordon
2014/05/01 05:52:21
Yes I think that'd be overkill. At this level of
Noel Gordon
2014/05/01 07:33:24
Good question.
Yeap, difficult. gfx::Display is n
| |
| 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 |