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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // If |view| is null, the primary display is used as the context. | 81 // If |view| is null, the primary display is used as the context. |
82 virtual gfx::Rect ScreenToDIPRectInWindow(gfx::NativeView view, | 82 virtual gfx::Rect ScreenToDIPRectInWindow(gfx::NativeView view, |
83 const gfx::Rect& screen_rect) const; | 83 const gfx::Rect& screen_rect) const; |
84 | 84 |
85 // Converts |dip_rect| to screen coordinates in the context of |view| clamping | 85 // Converts |dip_rect| to screen coordinates in the context of |view| clamping |
86 // to the enclosing rect if the coordinates do not fall on pixel boundaries. | 86 // to the enclosing rect if the coordinates do not fall on pixel boundaries. |
87 // If |view| is null, the primary display is used as the context. | 87 // If |view| is null, the primary display is used as the context. |
88 virtual gfx::Rect DIPToScreenRectInWindow(gfx::NativeView view, | 88 virtual gfx::Rect DIPToScreenRectInWindow(gfx::NativeView view, |
89 const gfx::Rect& dip_rect) const; | 89 const gfx::Rect& dip_rect) const; |
90 | 90 |
| 91 // Returns true if the display with |display_id| is found and returns that |
| 92 // display in |display|. Otherwise returns false and |display| remains |
| 93 // untouched. |
| 94 bool GetDisplayWithDisplayId(int64_t display_id, |
| 95 display::Display* display) const; |
| 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 |