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

Side by Side Diff: extensions/browser/api/system_display/display_info_provider.cc

Issue 2620073002: Adds the touch calibration setting behind a chrome switch (Closed)
Patch Set: nits Created 3 years, 11 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 | « chromeos/chromeos_switches.cc ('k') | extensions/common/api/system_display.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromeos/chromeos_switches.cc ('k') | extensions/common/api/system_display.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698