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

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

Issue 1639623003: ScreenWin Testability and Restructuring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 private: 148 private:
149 int64_t id_; 149 int64_t id_;
150 Rect bounds_; 150 Rect bounds_;
151 Rect work_area_; 151 Rect work_area_;
152 float device_scale_factor_; 152 float device_scale_factor_;
153 Rotation rotation_; 153 Rotation rotation_;
154 TouchSupport touch_support_; 154 TouchSupport touch_support_;
155 }; 155 };
156 156
157 inline bool operator==(const gfx::Display& lhs, const gfx::Display& rhs) {
158 return lhs.id() == rhs.id() &&
159 lhs.bounds() == rhs.bounds() &&
160 lhs.work_area() == rhs.work_area() &&
161 lhs.device_scale_factor() == rhs.device_scale_factor() &&
162 lhs.rotation() == rhs.rotation() &&
163 lhs.touch_support() == rhs.touch_support();
164 }
oshima 2016/01/28 18:32:04 One concern I have is that this differ from identi
robliao 2016/01/29 01:44:40 sgtm. Done.
165
166 // This is declared here for use in gtest-based unit tests but is defined in
167 // the gfx_test_support target. Depend on that to use this in your unit test.
168 // This should not be used in production code - call ToString() instead.
169 void PrintTo(const Display& display, ::std::ostream* os);
170
157 } // namespace gfx 171 } // namespace gfx
158 172
159 #endif // UI_GFX_DISPLAY_H_ 173 #endif // UI_GFX_DISPLAY_H_
OLDNEW
« no previous file with comments | « ui/gfx/BUILD.gn ('k') | ui/gfx/gfx.gyp » ('j') | ui/gfx/screen_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698