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

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

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
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 #include "services/ui/display/viewport_metrics.h"
6
7 #include "base/strings/stringprintf.h"
8
9 namespace display {
10
11 namespace {
12
13 std::string RotationString(Display::Rotation rotation) {
14 switch (rotation) {
15 case Display::ROTATE_0:
16 return "0";
17 case Display::ROTATE_90:
18 return "90";
19 case Display::ROTATE_180:
20 return "180";
21 case Display::ROTATE_270:
22 return "270";
23 }
24 NOTREACHED();
25 return "Invalid Rotation";
26 }
27
28 } // namespace
29
30 std::string ViewportMetrics::ToString() const {
31 return base::StringPrintf(
32 "ViewportMetrics(bounds=%s, work_area=%s, pixel_size=%s, "
33 "rotation=%s, device_scale_factor=%g)",
34 bounds.ToString().c_str(), work_area.ToString().c_str(),
35 pixel_size.ToString().c_str(), RotationString(rotation).c_str(),
36 device_scale_factor);
37 }
38
39 } // namespace display
OLDNEW
« no previous file with comments | « services/ui/display/viewport_metrics.h ('k') | services/ui/public/cpp/tests/window_server_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698