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

Side by Side Diff: ui/display/chromeos/display_configurator.h

Issue 1456623002: Add support for virtual displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test (removing need for friend on DisplayConfigurator) Created 5 years, 1 month 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 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>
11 #include <queue> 11 #include <queue>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/event_types.h" 15 #include "base/event_types.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/scoped_vector.h"
17 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
18 #include "base/observer_list.h" 19 #include "base/observer_list.h"
19 #include "base/timer/timer.h" 20 #include "base/timer/timer.h"
20 #include "third_party/cros_system_api/dbus/service_constants.h" 21 #include "third_party/cros_system_api/dbus/service_constants.h"
22 #include "ui/display/chromeos/display_snapshot_virtual.h"
21 #include "ui/display/chromeos/query_content_protection_task.h" 23 #include "ui/display/chromeos/query_content_protection_task.h"
22 #include "ui/display/display_export.h" 24 #include "ui/display/display_export.h"
23 #include "ui/display/types/display_constants.h" 25 #include "ui/display/types/display_constants.h"
24 #include "ui/display/types/native_display_observer.h" 26 #include "ui/display/types/native_display_observer.h"
25 #include "ui/gfx/geometry/size.h" 27 #include "ui/gfx/geometry/size.h"
26 28
27 namespace gfx { 29 namespace gfx {
28 class Point; 30 class Point;
29 class Size; 31 class Size;
30 } 32 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 int64_t display_id); 264 int64_t display_id);
263 265
264 // Updates the color calibration to |new_profile|. 266 // Updates the color calibration to |new_profile|.
265 bool SetColorCalibrationProfile(int64_t display_id, 267 bool SetColorCalibrationProfile(int64_t display_id,
266 ui::ColorCalibrationProfile new_profile); 268 ui::ColorCalibrationProfile new_profile);
267 269
268 // Sets the gamma ramp for |display_id| to the values in |lut|. 270 // Sets the gamma ramp for |display_id| to the values in |lut|.
269 bool SetGammaRamp(int64_t display_id, 271 bool SetGammaRamp(int64_t display_id,
270 const std::vector<GammaRampRGBEntry>& lut); 272 const std::vector<GammaRampRGBEntry>& lut);
271 273
274 // Enables/disables virtual display.
275 int64_t AddVirtualDisplay(gfx::Size display_size);
276 bool RemoveVirtualDisplay(int64_t display_id);
277
272 private: 278 private:
273 class DisplayLayoutManagerImpl; 279 class DisplayLayoutManagerImpl;
274 280
275 // Mapping a client to its protection request. 281 // Mapping a client to its protection request.
276 typedef std::map<ContentProtectionClientId, ContentProtections> 282 typedef std::map<ContentProtectionClientId, ContentProtections>
277 ProtectionRequests; 283 ProtectionRequests;
278 284
279 // Performs platform specific delegate initialization. 285 // Performs platform specific delegate initialization.
280 scoped_ptr<NativeDisplayDelegate> CreatePlatformNativeDisplayDelegate(); 286 scoped_ptr<NativeDisplayDelegate> CreatePlatformNativeDisplayDelegate();
281 287
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 // Display controlled by an external entity. 420 // Display controlled by an external entity.
415 bool display_externally_controlled_; 421 bool display_externally_controlled_;
416 422
417 // True if a TakeControl or RelinquishControl has been called but the response 423 // True if a TakeControl or RelinquishControl has been called but the response
418 // hasn't arrived yet. 424 // hasn't arrived yet.
419 bool display_control_changing_; 425 bool display_control_changing_;
420 426
421 // Whether the displays are currently suspended. 427 // Whether the displays are currently suspended.
422 bool displays_suspended_; 428 bool displays_suspended_;
423 429
430 // Virtual display control.
431 ScopedVector<DisplaySnapshot> virtual_display_snapshots_;
432
433 // Last used virtual display id.
434 int64_t last_virtual_display_id_ = 0;
oshima 2015/11/24 22:19:27 Can you factor out GetID in ui/display/util/edid_p
robert.bradford 2015/11/26 16:29:40 Ah, that's a great solution. I wasn't very happy w
435
424 scoped_ptr<DisplayLayoutManager> layout_manager_; 436 scoped_ptr<DisplayLayoutManager> layout_manager_;
425 437
426 scoped_ptr<UpdateDisplayConfigurationTask> configuration_task_; 438 scoped_ptr<UpdateDisplayConfigurationTask> configuration_task_;
427 439
428 // This must be the last variable. 440 // This must be the last variable.
429 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; 441 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_;
430 442
431 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 443 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
432 }; 444 };
433 445
434 } // namespace ui 446 } // namespace ui
435 447
436 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 448 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698