| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 api::system_display::DisplayUnitInfo DisplayInfoProvider::CreateDisplayUnitInfo( | 54 api::system_display::DisplayUnitInfo DisplayInfoProvider::CreateDisplayUnitInfo( |
| 55 const display::Display& display, | 55 const display::Display& display, |
| 56 int64_t primary_display_id) { | 56 int64_t primary_display_id) { |
| 57 api::system_display::DisplayUnitInfo unit; | 57 api::system_display::DisplayUnitInfo unit; |
| 58 const gfx::Rect& bounds = display.bounds(); | 58 const gfx::Rect& bounds = display.bounds(); |
| 59 const gfx::Rect& work_area = display.work_area(); | 59 const gfx::Rect& work_area = display.work_area(); |
| 60 unit.id = base::Int64ToString(display.id()); | 60 unit.id = base::Int64ToString(display.id()); |
| 61 unit.is_primary = (display.id() == primary_display_id); | 61 unit.is_primary = (display.id() == primary_display_id); |
| 62 unit.is_internal = display.IsInternal(); | 62 unit.is_internal = display.IsInternal(); |
| 63 unit.is_enabled = true; | 63 unit.is_enabled = true; |
| 64 unit.is_unified = false; |
| 64 unit.rotation = RotationToDegrees(display.rotation()); | 65 unit.rotation = RotationToDegrees(display.rotation()); |
| 65 unit.bounds.left = bounds.x(); | 66 unit.bounds.left = bounds.x(); |
| 66 unit.bounds.top = bounds.y(); | 67 unit.bounds.top = bounds.y(); |
| 67 unit.bounds.width = bounds.width(); | 68 unit.bounds.width = bounds.width(); |
| 68 unit.bounds.height = bounds.height(); | 69 unit.bounds.height = bounds.height(); |
| 69 unit.work_area.left = work_area.x(); | 70 unit.work_area.left = work_area.x(); |
| 70 unit.work_area.top = work_area.y(); | 71 unit.work_area.top = work_area.y(); |
| 71 unit.work_area.width = work_area.width(); | 72 unit.work_area.width = work_area.width(); |
| 72 unit.work_area.height = work_area.height(); | 73 unit.work_area.height = work_area.height(); |
| 73 unit.has_touch_support = | 74 unit.has_touch_support = |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 151 |
| 151 bool DisplayInfoProvider::IsNativeTouchCalibrationActive(std::string* error) { | 152 bool DisplayInfoProvider::IsNativeTouchCalibrationActive(std::string* error) { |
| 152 NOTREACHED(); // Implemented on Chrome OS only in override. | 153 NOTREACHED(); // Implemented on Chrome OS only in override. |
| 153 return true; | 154 return true; |
| 154 } | 155 } |
| 155 | 156 |
| 156 DisplayInfoProvider::DisplayInfoProvider() { | 157 DisplayInfoProvider::DisplayInfoProvider() { |
| 157 } | 158 } |
| 158 | 159 |
| 159 } // namespace extensions | 160 } // namespace extensions |
| OLD | NEW |