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

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

Issue 1426933002: Refactor Windows DPI Point, Rect, and Size for Multiple Monitor DPI Awareness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Other Unit Tests - Moved Inner Classes Outside Created 4 years, 11 months 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
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_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/macros.h" 10 #include "base/macros.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 virtual gfx::Display GetDisplayMatching( 84 virtual gfx::Display GetDisplayMatching(
85 const gfx::Rect& match_rect) const = 0; 85 const gfx::Rect& match_rect) const = 0;
86 86
87 // Returns the primary display. 87 // Returns the primary display.
88 virtual gfx::Display GetPrimaryDisplay() const = 0; 88 virtual gfx::Display GetPrimaryDisplay() const = 0;
89 89
90 // Adds/Removes display observers. 90 // Adds/Removes display observers.
91 virtual void AddObserver(DisplayObserver* observer) = 0; 91 virtual void AddObserver(DisplayObserver* observer) = 0;
92 virtual void RemoveObserver(DisplayObserver* observer) = 0; 92 virtual void RemoveObserver(DisplayObserver* observer) = 0;
93 93
94 // Converts |screen_rect| to DIP coordinates in the context of view. If |view|
95 // is null, the primary display is used as the context.
96 virtual gfx::Rect ScreenToDIPRectInWindow(NativeView view,
97 const gfx::Rect& screen_rect) const;
98
99 // Converts |dip_rect| to screen coordinates in the context of view. If |view|
100 // is null, the primary display is used as the context.
101 virtual gfx::Rect DIPToScreenRectInWindow(NativeView view,
102 const gfx::Rect& dip_rect) const;
103
94 private: 104 private:
95 DISALLOW_COPY_AND_ASSIGN(Screen); 105 DISALLOW_COPY_AND_ASSIGN(Screen);
96 }; 106 };
97 107
98 Screen* CreateNativeScreen(); 108 Screen* CreateNativeScreen();
99 109
100 } // namespace gfx 110 } // namespace gfx
101 111
102 #endif // UI_GFX_SCREEN_H_ 112 #endif // UI_GFX_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698