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

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

Issue 12257016: (Not ready for review!) Toolbar and views high dpi support. Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Cleaned up more useless diffs. Created 7 years, 10 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
« no previous file with comments | « ui/gfx/canvas_paint_win.h ('k') | ui/gfx/display.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_GFX_DISPLAY_H_ 5 #ifndef UI_GFX_DISPLAY_H_
6 #define UI_GFX_DISPLAY_H_ 6 #define UI_GFX_DISPLAY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "ui/base/ui_export.h" 10 #include "ui/base/ui_export.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // between old bounds and work area. 81 // between old bounds and work area.
82 void SetSize(const gfx::Size& size_in_pixel); 82 void SetSize(const gfx::Size& size_in_pixel);
83 83
84 // Computes and updates the display's work are using 84 // Computes and updates the display's work are using
85 // |work_area_insets| and the bounds. 85 // |work_area_insets| and the bounds.
86 void UpdateWorkAreaFromInsets(const gfx::Insets& work_area_insets); 86 void UpdateWorkAreaFromInsets(const gfx::Insets& work_area_insets);
87 87
88 // Returns the display's size in pixel coordinates. 88 // Returns the display's size in pixel coordinates.
89 gfx::Size GetSizeInPixel() const; 89 gfx::Size GetSizeInPixel() const;
90 90
91 #if defined(USE_AURA) 91 #if defined(USE_AURA) || defined(OS_WIN)
92 // TODO(oshima|skuhne): Eliminate the use of bounds_in_pixel in events_x.cc 92 // TODO(oshima|skuhne): Eliminate the use of bounds_in_pixel in events_x.cc
93 // and remove bounds_in_pixel from gfx::Display. 93 // and remove bounds_in_pixel from gfx::Display.
94 // Returns the display's bounds in pixel coordinates. 94 // Returns the display's bounds in pixel coordinates.
95 const Rect& bounds_in_pixel() const { return bounds_in_pixel_; } 95 const Rect& bounds_in_pixel() const { return bounds_in_pixel_; }
96 #endif 96 #endif
97 97
98 // Returns a string representation of the display; 98 // Returns a string representation of the display;
99 std::string ToString() const; 99 std::string ToString() const;
100 100
101 // True if the display contains valid display id. 101 // True if the display contains valid display id.
102 bool is_valid() const { return id_ != kInvalidDisplayID; } 102 bool is_valid() const { return id_ != kInvalidDisplayID; }
103 103
104 static const int64 kInvalidDisplayID; 104 static const int64 kInvalidDisplayID;
105 105
106 private: 106 private:
107 int64 id_; 107 int64 id_;
108 Rect bounds_; 108 Rect bounds_;
109 Rect work_area_; 109 Rect work_area_;
110 #if defined(USE_AURA) 110 #if defined(USE_AURA) || defined(OS_WIN)
111 Rect bounds_in_pixel_; 111 Rect bounds_in_pixel_;
112 #endif 112 #endif
113 float device_scale_factor_; 113 float device_scale_factor_;
114 }; 114 };
115 115
116 } // namespace gfx 116 } // namespace gfx
117 117
118 #endif // UI_GFX_DISPLAY_H_ 118 #endif // UI_GFX_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/gfx/canvas_paint_win.h ('k') | ui/gfx/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698