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

Side by Side Diff: ui/display/manager/display_manager.h

Issue 2540383002: Updates display manager and display preferences to handle touch calibration data. (Closed)
Patch Set: Merge with ToT Created 4 years 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 5 #ifndef UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
6 #define UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 6 #define UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 // the default mode. 157 // the default mode.
158 bool ResetDisplayToDefaultMode(int64_t display_id); 158 bool ResetDisplayToDefaultMode(int64_t display_id);
159 159
160 // Sets the external display's configuration, including resolution change, 160 // Sets the external display's configuration, including resolution change,
161 // ui-scale change, and device scale factor change. Returns true if it changes 161 // ui-scale change, and device scale factor change. Returns true if it changes
162 // the display resolution so that the caller needs to show a notification in 162 // the display resolution so that the caller needs to show a notification in
163 // case the new resolution actually doesn't work. 163 // case the new resolution actually doesn't work.
164 bool SetDisplayMode(int64_t display_id, 164 bool SetDisplayMode(int64_t display_id,
165 const scoped_refptr<ManagedDisplayMode>& display_mode); 165 const scoped_refptr<ManagedDisplayMode>& display_mode);
166 166
167 // Register per display properties. |overscan_insets| is null if the display 167 // Register per display properties.
168 // has no custom overscan insets. 168 // |overscan_insets| is null if the display has no custom overscan insets.
169 void RegisterDisplayProperty(int64_t display_id, 169 // |touch_calibration_data| is null if the display has no touch calibration
170 Display::Rotation rotation, 170 // associated data.
171 float ui_scale, 171 void RegisterDisplayProperty(
172 const gfx::Insets* overscan_insets, 172 int64_t display_id,
173 const gfx::Size& resolution_in_pixels, 173 Display::Rotation rotation,
174 float device_scale_factor, 174 float ui_scale,
175 ui::ColorCalibrationProfile color_profile); 175 const gfx::Insets* overscan_insets,
176 const gfx::Size& resolution_in_pixels,
177 float device_scale_factor,
178 ui::ColorCalibrationProfile color_profile,
179 const TouchCalibrationData* touch_calibration_data);
176 180
177 // Register stored rotation properties for the internal display. 181 // Register stored rotation properties for the internal display.
178 void RegisterDisplayRotationProperties(bool rotation_lock, 182 void RegisterDisplayRotationProperties(bool rotation_lock,
179 Display::Rotation rotation); 183 Display::Rotation rotation);
180 184
181 // Returns the stored rotation lock preference if it has been loaded, 185 // Returns the stored rotation lock preference if it has been loaded,
182 // otherwise false. 186 // otherwise false.
183 bool registered_internal_display_rotation_lock() const { 187 bool registered_internal_display_rotation_lock() const {
184 return registered_internal_display_rotation_lock_; 188 return registered_internal_display_rotation_lock_;
185 } 189 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 292
289 // Used to emulate display change when run in a desktop environment instead 293 // Used to emulate display change when run in a desktop environment instead
290 // of on a device. 294 // of on a device.
291 void AddRemoveDisplay(); 295 void AddRemoveDisplay();
292 void ToggleDisplayScaleFactor(); 296 void ToggleDisplayScaleFactor();
293 297
294 // SoftwareMirroringController override: 298 // SoftwareMirroringController override:
295 #if defined(OS_CHROMEOS) 299 #if defined(OS_CHROMEOS)
296 void SetSoftwareMirroring(bool enabled) override; 300 void SetSoftwareMirroring(bool enabled) override;
297 bool SoftwareMirroringEnabled() const override; 301 bool SoftwareMirroringEnabled() const override;
302 void SetTouchCalibrationData(
303 int64_t display_id,
304 const TouchCalibrationData::CalibrationPointPairQuad& point_pair_quad,
305 const gfx::Size& display_bounds);
306 void ClearTouchCalibrationData(int64_t display_id);
298 #endif 307 #endif
299 308
300 // Sets/gets default multi display mode. 309 // Sets/gets default multi display mode.
301 void SetDefaultMultiDisplayModeForCurrentDisplays(MultiDisplayMode mode); 310 void SetDefaultMultiDisplayModeForCurrentDisplays(MultiDisplayMode mode);
302 MultiDisplayMode current_default_multi_display_mode() const { 311 MultiDisplayMode current_default_multi_display_mode() const {
303 return current_default_multi_display_mode_; 312 return current_default_multi_display_mode_;
304 } 313 }
305 314
306 // Sets multi display mode. 315 // Sets multi display mode.
307 void SetMultiDisplayMode(MultiDisplayMode mode); 316 void SetMultiDisplayMode(MultiDisplayMode mode);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 base::ObserverList<DisplayObserver> observers_; 465 base::ObserverList<DisplayObserver> observers_;
457 466
458 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; 467 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_;
459 468
460 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 469 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
461 }; 470 };
462 471
463 } // namespace display 472 } // namespace display
464 473
465 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 474 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/display/display_preferences_unittest.cc ('k') | ui/display/manager/display_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698