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_DISPLAY_SCREEN_H_ | 5 #ifndef UI_DISPLAY_SCREEN_H_ |
6 #define UI_DISPLAY_SCREEN_H_ | 6 #define UI_DISPLAY_SCREEN_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) = 0; | 48 virtual gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) = 0; |
49 | 49 |
50 // Returns the number of displays. | 50 // Returns the number of displays. |
51 // Mirrored displays are excluded; this method is intended to return the | 51 // Mirrored displays are excluded; this method is intended to return the |
52 // number of distinct, usable displays. | 52 // number of distinct, usable displays. |
53 virtual int GetNumDisplays() const = 0; | 53 virtual int GetNumDisplays() const = 0; |
54 | 54 |
55 // Returns the list of displays that are currently available. | 55 // Returns the list of displays that are currently available. |
56 virtual std::vector<display::Display> GetAllDisplays() const = 0; | 56 virtual std::vector<display::Display> GetAllDisplays() const = 0; |
57 | 57 |
58 // Returns true if the display with |display_id| is found and returns that | |
sky
2016/10/06 15:20:03
Is there a reason this can't be made a helper func
riajiang
2016/10/06 18:26:31
We were thinking to change some subclasses of disp
sky
2016/10/06 21:28:34
That seems orthogonal. You could change subclasses
| |
59 // display in |display|. Otherwise returns false and |display| remains | |
60 // untouched. | |
61 virtual bool GetDisplayWithDisplayId(int64_t display_id, | |
62 display::Display* display) const = 0; | |
63 | |
58 // Returns the display nearest the specified window. | 64 // Returns the display nearest the specified window. |
59 // If the window is NULL or the window is not rooted to a display this will | 65 // If the window is NULL or the window is not rooted to a display this will |
60 // return the primary display. | 66 // return the primary display. |
61 virtual display::Display GetDisplayNearestWindow( | 67 virtual display::Display GetDisplayNearestWindow( |
62 gfx::NativeView view) const = 0; | 68 gfx::NativeView view) const = 0; |
63 | 69 |
64 // Returns the display nearest the specified point. |point| should be in DIPs. | 70 // Returns the display nearest the specified point. |point| should be in DIPs. |
65 virtual display::Display GetDisplayNearestPoint( | 71 virtual display::Display GetDisplayNearestPoint( |
66 const gfx::Point& point) const = 0; | 72 const gfx::Point& point) const = 0; |
67 | 73 |
(...skipping 22 matching lines...) Expand all Loading... | |
90 | 96 |
91 private: | 97 private: |
92 DISALLOW_COPY_AND_ASSIGN(Screen); | 98 DISALLOW_COPY_AND_ASSIGN(Screen); |
93 }; | 99 }; |
94 | 100 |
95 Screen* CreateNativeScreen(); | 101 Screen* CreateNativeScreen(); |
96 | 102 |
97 } // namespace display | 103 } // namespace display |
98 | 104 |
99 #endif // UI_DISPLAY_SCREEN_H_ | 105 #endif // UI_DISPLAY_SCREEN_H_ |
OLD | NEW |