Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Side by Side Diff: ui/display/screen.h

Issue 2361283002: Add GetDisplayWithDisplayId to display::Screen. (Closed)
Patch Set: move unittest Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/screen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698