| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "ui/display/manager/chromeos/display_snapshot_virtual.h" | 5 #include "ui/display/manager/chromeos/display_snapshot_virtual.h" |
| 6 | 6 |
| 7 #include <inttypes.h> | 7 #include <inttypes.h> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "ui/display/types/display_mode.h" | 10 #include "ui/display/types/display_mode.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace display { |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // For a non hi-DPI display (96 dpi) use a pitch of 265µm. | 16 // For a non hi-DPI display (96 dpi) use a pitch of 265µm. |
| 17 static const float kVirtualDisplayPitchMM = 0.265; | 17 static const float kVirtualDisplayPitchMM = 0.265; |
| 18 | 18 |
| 19 } // namespace | 19 } // namespace |
| 20 | 20 |
| 21 DisplaySnapshotVirtual::DisplaySnapshotVirtual(int64_t display_id, | 21 DisplaySnapshotVirtual::DisplaySnapshotVirtual(int64_t display_id, |
| 22 const gfx::Size& display_size) | 22 const gfx::Size& display_size) |
| (...skipping 20 matching lines...) Expand all Loading... |
| 43 | 43 |
| 44 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() {} | 44 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() {} |
| 45 | 45 |
| 46 std::string DisplaySnapshotVirtual::ToString() const { | 46 std::string DisplaySnapshotVirtual::ToString() const { |
| 47 return base::StringPrintf( | 47 return base::StringPrintf( |
| 48 "Virtual id=%" PRId64 " current_mode=%s physical_size=%s", display_id_, | 48 "Virtual id=%" PRId64 " current_mode=%s physical_size=%s", display_id_, |
| 49 current_mode_ ? current_mode_->ToString().c_str() : "nullptr", | 49 current_mode_ ? current_mode_->ToString().c_str() : "nullptr", |
| 50 physical_size_.ToString().c_str()); | 50 physical_size_.ToString().c_str()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 } // namespace ui | 53 } // namespace display |
| OLD | NEW |