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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 const std::vector<Display>& GetAllDisplays() const = 0; | 56 virtual const std::vector<Display>& GetAllDisplays() const = 0; |
57 | 57 |
58 // Returns the display nearest the specified window. | 58 // Returns the display nearest the specified window. |
59 // If the window is NULL or the window is not rooted to a display this will | 59 // If the window is NULL or the window is not rooted to a display this will |
60 // return the primary display. | 60 // return the primary display. |
61 virtual Display GetDisplayNearestWindow(gfx::NativeView view) const = 0; | 61 virtual Display GetDisplayNearestWindow(gfx::NativeView view) const = 0; |
62 | 62 |
63 #if defined(OS_ANDROID) | |
64 // This method is needed since NativeWindow is not a NativeView on Android. | |
boliu
2017/01/24 23:47:13
wait.. this hasn't happened yet in this CL?
Jinsuk Kim
2017/01/25 02:34:34
It was in the huge CL I'm splitting now. Or shall
| |
65 virtual display::Display GetDisplayNearestWindowAndroid( | |
66 gfx::NativeWindow window) const = 0; | |
67 #endif | |
68 | |
63 // Returns the display nearest the specified point. |point| should be in DIPs. | 69 // Returns the display nearest the specified point. |point| should be in DIPs. |
64 virtual Display GetDisplayNearestPoint(const gfx::Point& point) const = 0; | 70 virtual Display GetDisplayNearestPoint(const gfx::Point& point) const = 0; |
65 | 71 |
66 // Returns the display that most closely intersects the provided bounds. | 72 // Returns the display that most closely intersects the provided bounds. |
67 virtual Display GetDisplayMatching(const gfx::Rect& match_rect) const = 0; | 73 virtual Display GetDisplayMatching(const gfx::Rect& match_rect) const = 0; |
68 | 74 |
69 // Returns the primary display. | 75 // Returns the primary display. |
70 virtual Display GetPrimaryDisplay() const = 0; | 76 virtual Display GetPrimaryDisplay() const = 0; |
71 | 77 |
72 // Adds/Removes display observers. | 78 // Adds/Removes display observers. |
(...skipping 19 matching lines...) Expand all Loading... | |
92 | 98 |
93 private: | 99 private: |
94 DISALLOW_COPY_AND_ASSIGN(Screen); | 100 DISALLOW_COPY_AND_ASSIGN(Screen); |
95 }; | 101 }; |
96 | 102 |
97 Screen* CreateNativeScreen(); | 103 Screen* CreateNativeScreen(); |
98 | 104 |
99 } // namespace display | 105 } // namespace display |
100 | 106 |
101 #endif // UI_DISPLAY_SCREEN_H_ | 107 #endif // UI_DISPLAY_SCREEN_H_ |
OLD | NEW |