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

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

Issue 2434923002: Handle modified displays in mustash. (Closed)
Patch Set: Fix PlatformScreenStub for tests. Created 4 years, 2 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 | « services/ui/display/platform_screen_stub.cc ('k') | services/ui/display/viewport_metrics.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_
6 #define SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_
7
8 #include "ui/display/display.h"
9 #include "ui/gfx/geometry/rect.h"
10 #include "ui/gfx/geometry/size.h"
11
12 namespace display {
13
14 struct ViewportMetrics {
15 std::string ToString() const;
16
17 gfx::Rect bounds; // DIP.
18 gfx::Rect work_area; // DIP.
19 gfx::Size pixel_size;
20 Display::Rotation rotation = Display::ROTATE_0;
21 float device_scale_factor = 0.0f;
22 };
23
24 inline bool operator==(const ViewportMetrics& lhs, const ViewportMetrics& rhs) {
25 return lhs.bounds == rhs.bounds && lhs.work_area == rhs.work_area &&
26 lhs.pixel_size == rhs.pixel_size && lhs.rotation == rhs.rotation &&
27 lhs.device_scale_factor == rhs.device_scale_factor;
28 }
29
30 inline bool operator!=(const ViewportMetrics& lhs, const ViewportMetrics& rhs) {
31 return !(lhs == rhs);
32 }
33
34 } // namespace display
35
36 #endif // SERVICES_UI_DISPLAY_VIEWPORT_METRICS_H_
OLDNEW
« no previous file with comments | « services/ui/display/platform_screen_stub.cc ('k') | services/ui/display/viewport_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698