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

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: missing nits 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // the default mode. 159 // the default mode.
160 bool ResetDisplayToDefaultMode(int64_t display_id); 160 bool ResetDisplayToDefaultMode(int64_t display_id);
161 161
162 // Sets the external display's configuration, including resolution change, 162 // Sets the external display's configuration, including resolution change,
163 // ui-scale change, and device scale factor change. Returns true if it changes 163 // ui-scale change, and device scale factor change. Returns true if it changes
164 // the display resolution so that the caller needs to show a notification in 164 // the display resolution so that the caller needs to show a notification in
165 // case the new resolution actually doesn't work. 165 // case the new resolution actually doesn't work.
166 bool SetDisplayMode(int64_t display_id, 166 bool SetDisplayMode(int64_t display_id,
167 const scoped_refptr<ManagedDisplayMode>& display_mode); 167 const scoped_refptr<ManagedDisplayMode>& display_mode);
168 168
169 // Register per display properties. |overscan_insets| is null if the display 169 // Register per display properties.
170 // has no custom overscan insets. 170 // |overscan_insets| is null if the display has no custom overscan insets.
171 void RegisterDisplayProperty(int64_t display_id, 171 // |touch_calibration_data| is null if the display has no touch calibration
172 Display::Rotation rotation, 172 // associated data.
173 float ui_scale, 173 void RegisterDisplayProperty(
174 const gfx::Insets* overscan_insets, 174 int64_t display_id,
175 const gfx::Size& resolution_in_pixels, 175 Display::Rotation rotation,
176 float device_scale_factor, 176 float ui_scale,
177 ui::ColorCalibrationProfile color_profile); 177 const gfx::Insets* overscan_insets,
178 const gfx::Size& resolution_in_pixels,
179 float device_scale_factor,
180 ui::ColorCalibrationProfile color_profile,
181 const TouchCalibrationData* touch_calibration_data);
178 182
179 // Register stored rotation properties for the internal display. 183 // Register stored rotation properties for the internal display.
180 void RegisterDisplayRotationProperties(bool rotation_lock, 184 void RegisterDisplayRotationProperties(bool rotation_lock,
181 Display::Rotation rotation); 185 Display::Rotation rotation);
182 186
183 // Returns the stored rotation lock preference if it has been loaded, 187 // Returns the stored rotation lock preference if it has been loaded,
184 // otherwise false. 188 // otherwise false.
185 bool registered_internal_display_rotation_lock() const { 189 bool registered_internal_display_rotation_lock() const {
186 return registered_internal_display_rotation_lock_; 190 return registered_internal_display_rotation_lock_;
187 } 191 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 294
291 // Used to emulate display change when run in a desktop environment instead 295 // Used to emulate display change when run in a desktop environment instead
292 // of on a device. 296 // of on a device.
293 void AddRemoveDisplay(); 297 void AddRemoveDisplay();
294 void ToggleDisplayScaleFactor(); 298 void ToggleDisplayScaleFactor();
295 299
296 // SoftwareMirroringController override: 300 // SoftwareMirroringController override:
297 #if defined(OS_CHROMEOS) 301 #if defined(OS_CHROMEOS)
298 void SetSoftwareMirroring(bool enabled) override; 302 void SetSoftwareMirroring(bool enabled) override;
299 bool SoftwareMirroringEnabled() const override; 303 bool SoftwareMirroringEnabled() const override;
304 void SetTouchCalibrationData(
305 int64_t display_id,
306 const TouchCalibrationData::CalibrationPointPairQuad& point_pair_quad,
307 const gfx::Size& display_bounds);
308 void ClearTouchCalibrationData(int64_t display_id);
300 #endif 309 #endif
301 310
302 // Sets/gets default multi display mode. 311 // Sets/gets default multi display mode.
303 void SetDefaultMultiDisplayModeForCurrentDisplays(MultiDisplayMode mode); 312 void SetDefaultMultiDisplayModeForCurrentDisplays(MultiDisplayMode mode);
304 MultiDisplayMode current_default_multi_display_mode() const { 313 MultiDisplayMode current_default_multi_display_mode() const {
305 return current_default_multi_display_mode_; 314 return current_default_multi_display_mode_;
306 } 315 }
307 316
308 // Sets multi display mode. 317 // Sets multi display mode.
309 void SetMultiDisplayMode(MultiDisplayMode mode); 318 void SetMultiDisplayMode(MultiDisplayMode mode);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 base::ObserverList<DisplayObserver> observers_; 467 base::ObserverList<DisplayObserver> observers_;
459 468
460 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_; 469 base::WeakPtrFactory<DisplayManager> weak_ptr_factory_;
461 470
462 DISALLOW_COPY_AND_ASSIGN(DisplayManager); 471 DISALLOW_COPY_AND_ASSIGN(DisplayManager);
463 }; 472 };
464 473
465 } // namespace display 474 } // namespace display
466 475
467 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_ 476 #endif // UI_DISPLAY_MANAGER_DISPLAY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698