OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 5 #ifndef UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 6 #define UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 bool SetColorCalibrationProfile(int64_t display_id, | 248 bool SetColorCalibrationProfile(int64_t display_id, |
249 ui::ColorCalibrationProfile new_profile); | 249 ui::ColorCalibrationProfile new_profile); |
250 | 250 |
251 private: | 251 private: |
252 // Mapping a display_id to a protection request bitmask. | 252 // Mapping a display_id to a protection request bitmask. |
253 typedef std::map<int64_t, uint32_t> ContentProtections; | 253 typedef std::map<int64_t, uint32_t> ContentProtections; |
254 // Mapping a client to its protection request. | 254 // Mapping a client to its protection request. |
255 typedef std::map<ContentProtectionClientId, ContentProtections> | 255 typedef std::map<ContentProtectionClientId, ContentProtections> |
256 ProtectionRequests; | 256 ProtectionRequests; |
257 | 257 |
258 // If |native_display_delegate_| and |touchscreen_delegate_| are not set, then | |
259 // set them to the passed in values. | |
260 void InitializeDelegates( | |
261 scoped_ptr<NativeDisplayDelegate> display_delegate, | |
262 scoped_ptr<TouchscreenDelegate> touchscreen_delegate); | |
263 | |
264 // Performs platform specific delegate initialization. | 258 // Performs platform specific delegate initialization. |
265 void PlatformInitialize(); | 259 scoped_ptr<NativeDisplayDelegate> CreatePlatformNativeDisplayDelegate(); |
| 260 scoped_ptr<TouchscreenDelegate> CreatePlatformTouchscreenDelegate(); |
266 | 261 |
267 // Updates |cached_displays_| to contain currently-connected displays. Calls | 262 // Updates |cached_displays_| to contain currently-connected displays. Calls |
268 // |delegate_->GetDisplays()| and then does additional work, like finding the | 263 // |delegate_->GetDisplays()| and then does additional work, like finding the |
269 // mirror mode and setting user-preferred modes. Note that the server must be | 264 // mirror mode and setting user-preferred modes. Note that the server must be |
270 // grabbed via |delegate_->GrabServer()| first. | 265 // grabbed via |delegate_->GrabServer()| first. |
271 void UpdateCachedDisplays(); | 266 void UpdateCachedDisplays(); |
272 | 267 |
273 // Helper method for UpdateCachedDisplays() that initializes the passed-in | 268 // Helper method for UpdateCachedDisplays() that initializes the passed-in |
274 // displays' |mirror_mode| fields by looking for a mode in |internal_display| | 269 // displays' |mirror_mode| fields by looking for a mode in |internal_display| |
275 // and |external_display| having the same resolution. Returns false if a | 270 // and |external_display| having the same resolution. Returns false if a |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 357 |
363 // Display protection requests of each client. | 358 // Display protection requests of each client. |
364 ProtectionRequests client_protection_requests_; | 359 ProtectionRequests client_protection_requests_; |
365 | 360 |
366 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); | 361 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); |
367 }; | 362 }; |
368 | 363 |
369 } // namespace ui | 364 } // namespace ui |
370 | 365 |
371 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ | 366 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ |
OLD | NEW |