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

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

Issue 615133002: Add support for a virtual display on ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ash/ dep from content Created 5 years, 9 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
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 <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/event_types.h" 14 #include "base/event_types.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/singleton.h" 16 #include "base/memory/singleton.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/observer_list.h" 18 #include "base/observer_list.h"
19 #include "base/timer/timer.h" 19 #include "base/timer/timer.h"
20 #include "third_party/cros_system_api/dbus/service_constants.h" 20 #include "third_party/cros_system_api/dbus/service_constants.h"
21 #include "ui/display/chromeos/display_snapshot_virtual.h"
21 #include "ui/display/display_export.h" 22 #include "ui/display/display_export.h"
22 #include "ui/display/types/display_constants.h" 23 #include "ui/display/types/display_constants.h"
23 #include "ui/display/types/native_display_observer.h" 24 #include "ui/display/types/native_display_observer.h"
24 #include "ui/gfx/geometry/size.h" 25 #include "ui/gfx/geometry/size.h"
25 26
26 namespace gfx { 27 namespace gfx {
27 class Point; 28 class Point;
28 class Size; 29 class Size;
29 } 30 }
30 31
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 283
283 // Checks the available color profiles for |display_id| and fills the result 284 // Checks the available color profiles for |display_id| and fills the result
284 // into |profiles|. 285 // into |profiles|.
285 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles( 286 std::vector<ui::ColorCalibrationProfile> GetAvailableColorCalibrationProfiles(
286 int64_t display_id); 287 int64_t display_id);
287 288
288 // Updates the color calibration to |new_profile|. 289 // Updates the color calibration to |new_profile|.
289 bool SetColorCalibrationProfile(int64_t display_id, 290 bool SetColorCalibrationProfile(int64_t display_id,
290 ui::ColorCalibrationProfile new_profile); 291 ui::ColorCalibrationProfile new_profile);
291 292
293 // Enables/disables virtual display.
294 void EnableVirtualDisplay(gfx::Size display_size);
295 void DisableVirtualDisplay();
296 bool IsVirtualDisplayEnabled() const;
297
298 // Finds the virtual display id, returns gfx::Display::kInvalidDisplayID if
299 // none.
300 int64_t GetVirtualDisplayId();
301
292 // static 302 // static
293 static DisplayConfigurator* GetInstance(); 303 static DisplayConfigurator* GetInstance();
294
295 private: 304 private:
296 friend struct DefaultSingletonTraits<DisplayConfigurator>; 305 friend struct DefaultSingletonTraits<DisplayConfigurator>;
297 friend class ui::test::DisplayConfiguratorTest; 306 friend class ui::test::DisplayConfiguratorTest;
298 class DisplayLayoutManagerImpl; 307 class DisplayLayoutManagerImpl;
299 308
300 DisplayConfigurator(); 309 DisplayConfigurator();
301 ~DisplayConfigurator() override; 310 ~DisplayConfigurator() override;
302 311
303 // Mapping a display_id to a protection request bitmask. 312 // Mapping a display_id to a protection request bitmask.
304 typedef std::map<int64_t, uint32_t> ContentProtections; 313 typedef std::map<int64_t, uint32_t> ContentProtections;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 431
423 // Display protection requests of each client. 432 // Display protection requests of each client.
424 ProtectionRequests client_protection_requests_; 433 ProtectionRequests client_protection_requests_;
425 434
426 // Display controlled by an external entity. 435 // Display controlled by an external entity.
427 bool display_externally_controlled_; 436 bool display_externally_controlled_;
428 437
429 // Whether the displays are currently suspended. 438 // Whether the displays are currently suspended.
430 bool displays_suspended_; 439 bool displays_suspended_;
431 440
441 // Virtual display control.
442 scoped_ptr<DisplaySnapshotVirtual> virtual_display_snapshot_;
443
432 scoped_ptr<DisplayLayoutManager> layout_manager_; 444 scoped_ptr<DisplayLayoutManager> layout_manager_;
433 445
434 scoped_ptr<UpdateDisplayConfigurationTask> configuration_task_; 446 scoped_ptr<UpdateDisplayConfigurationTask> configuration_task_;
435 447
436 // This must be the last variable. 448 // This must be the last variable.
437 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_; 449 base::WeakPtrFactory<DisplayConfigurator> weak_ptr_factory_;
438 450
439 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator); 451 DISALLOW_COPY_AND_ASSIGN(DisplayConfigurator);
440 }; 452 };
441 453
442 } // namespace ui 454 } // namespace ui
443 455
444 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_ 456 #endif // UI_DISPLAY_CHROMEOS_DISPLAY_CONFIGURATOR_H_
OLDNEW
« no previous file with comments | « ui/display/chromeos/configure_displays_task.cc ('k') | ui/display/chromeos/display_configurator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698