| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "extensions/browser/api/system_display/display_info_provider.h" | 5 #include "extensions/browser/api/system_display/display_info_provider.h" |
| 6 | 6 |
| 7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
| 8 #include "extensions/common/api/system_display.h" | 8 #include "extensions/common/api/system_display.h" |
| 9 #include "ui/display/display.h" | 9 #include "ui/display/display.h" |
| 10 #include "ui/display/screen.h" | 10 #include "ui/display/screen.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 unit.is_enabled = true; | 63 unit.is_enabled = true; |
| 64 unit.rotation = RotationToDegrees(display.rotation()); | 64 unit.rotation = RotationToDegrees(display.rotation()); |
| 65 unit.bounds.left = bounds.x(); | 65 unit.bounds.left = bounds.x(); |
| 66 unit.bounds.top = bounds.y(); | 66 unit.bounds.top = bounds.y(); |
| 67 unit.bounds.width = bounds.width(); | 67 unit.bounds.width = bounds.width(); |
| 68 unit.bounds.height = bounds.height(); | 68 unit.bounds.height = bounds.height(); |
| 69 unit.work_area.left = work_area.x(); | 69 unit.work_area.left = work_area.x(); |
| 70 unit.work_area.top = work_area.y(); | 70 unit.work_area.top = work_area.y(); |
| 71 unit.work_area.width = work_area.width(); | 71 unit.work_area.width = work_area.width(); |
| 72 unit.work_area.height = work_area.height(); | 72 unit.work_area.height = work_area.height(); |
| 73 unit.has_touch_support = |
| 74 display.touch_support() == display::Display::TOUCH_SUPPORT_AVAILABLE; |
| 73 return unit; | 75 return unit; |
| 74 } | 76 } |
| 75 | 77 |
| 76 bool DisplayInfoProvider::SetDisplayLayout(const DisplayLayoutList& layout) { | 78 bool DisplayInfoProvider::SetDisplayLayout(const DisplayLayoutList& layout) { |
| 77 NOTREACHED(); // Implemented on Chrome OS only in override. | 79 NOTREACHED(); // Implemented on Chrome OS only in override. |
| 78 return false; | 80 return false; |
| 79 } | 81 } |
| 80 | 82 |
| 81 void DisplayInfoProvider::EnableUnifiedDesktop(bool enable) {} | 83 void DisplayInfoProvider::EnableUnifiedDesktop(bool enable) {} |
| 82 | 84 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 | 142 |
| 141 bool DisplayInfoProvider::IsTouchCalibrationActive(std::string* error) { | 143 bool DisplayInfoProvider::IsTouchCalibrationActive(std::string* error) { |
| 142 NOTREACHED(); // Implemented on Chrome OS only in override. | 144 NOTREACHED(); // Implemented on Chrome OS only in override. |
| 143 return true; | 145 return true; |
| 144 } | 146 } |
| 145 | 147 |
| 146 DisplayInfoProvider::DisplayInfoProvider() { | 148 DisplayInfoProvider::DisplayInfoProvider() { |
| 147 } | 149 } |
| 148 | 150 |
| 149 } // namespace extensions | 151 } // namespace extensions |
| OLD | NEW |