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

Side by Side Diff: services/ui/display/viewport_metrics.h

Issue 2476663003: PlatformScreenOzone using DisplayManager (Closed)
Patch Set: Add missing data_dep. Created 3 years, 12 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_ 5 #ifndef SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_
6 #define SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_ 6 #define SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_
7 7
8 #include <string>
9
8 #include "ui/display/display.h" 10 #include "ui/display/display.h"
9 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
11 13
12 namespace display { 14 namespace display {
13 15
14 struct ViewportMetrics { 16 struct ViewportMetrics {
15 std::string ToString() const; 17 std::string ToString() const;
16 18
17 gfx::Rect bounds; // DIP. 19 gfx::Rect bounds; // DIP.
18 gfx::Rect work_area; // DIP. 20 gfx::Rect work_area; // DIP.
19 gfx::Size pixel_size; 21 gfx::Size pixel_size;
20 Display::Rotation rotation = Display::ROTATE_0; 22 Display::Rotation rotation = Display::ROTATE_0;
23 Display::TouchSupport touch_support = Display::TOUCH_SUPPORT_UNKNOWN;
21 float device_scale_factor = 0.0f; 24 float device_scale_factor = 0.0f;
25 float ui_scale_factor = 0.0f;
22 }; 26 };
23 27
24 inline bool operator==(const ViewportMetrics& lhs, const ViewportMetrics& rhs) { 28 inline bool operator==(const ViewportMetrics& lhs, const ViewportMetrics& rhs) {
25 return lhs.bounds == rhs.bounds && lhs.work_area == rhs.work_area && 29 return lhs.bounds == rhs.bounds && lhs.work_area == rhs.work_area &&
26 lhs.pixel_size == rhs.pixel_size && lhs.rotation == rhs.rotation && 30 lhs.pixel_size == rhs.pixel_size && lhs.rotation == rhs.rotation &&
27 lhs.device_scale_factor == rhs.device_scale_factor; 31 lhs.touch_support == rhs.touch_support &&
32 lhs.device_scale_factor == rhs.device_scale_factor &&
33 lhs.ui_scale_factor == rhs.ui_scale_factor;
28 } 34 }
29 35
30 inline bool operator!=(const ViewportMetrics& lhs, const ViewportMetrics& rhs) { 36 inline bool operator!=(const ViewportMetrics& lhs, const ViewportMetrics& rhs) {
31 return !(lhs == rhs); 37 return !(lhs == rhs);
32 } 38 }
33 39
34 } // namespace display 40 } // namespace display
35 41
36 #endif // SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_ 42 #endif // SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_
OLDNEW
« no previous file with comments | « services/ui/display/screen_manager_ozone_unittests.cc ('k') | services/ui/display/viewport_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698