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

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

Issue 1456623002: Add support for virtual displays (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use std::max as suggested by oshima@ Created 5 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 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_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ 5 #ifndef UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_
6 #define UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ 6 #define UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 17 matching lines...) Expand all
28 UpdateDisplayConfigurationTask(NativeDisplayDelegate* delegate, 28 UpdateDisplayConfigurationTask(NativeDisplayDelegate* delegate,
29 DisplayLayoutManager* layout_manager, 29 DisplayLayoutManager* layout_manager,
30 MultipleDisplayState new_display_state, 30 MultipleDisplayState new_display_state,
31 chromeos::DisplayPowerState new_power_state, 31 chromeos::DisplayPowerState new_power_state,
32 int power_flags, 32 int power_flags,
33 uint32_t background_color_argb, 33 uint32_t background_color_argb,
34 bool force_configure, 34 bool force_configure,
35 const ResponseCallback& callback); 35 const ResponseCallback& callback);
36 ~UpdateDisplayConfigurationTask(); 36 ~UpdateDisplayConfigurationTask();
37 37
38 // The pointers to the DisplaySnapshots in this vector are owned by
39 // DisplayConfigurator.
40 void set_virtual_display_snapshots(std::vector<DisplaySnapshot*> snapshots) {
41 virtual_display_snapshots_ = snapshots;
42 }
43
38 void Run(); 44 void Run();
39 45
40 private: 46 private:
41 // Callback to NativeDisplayDelegate::GetDisplays(). 47 // Callback to NativeDisplayDelegate::GetDisplays().
42 void OnDisplaysUpdated(const std::vector<DisplaySnapshot*>& displays); 48 void OnDisplaysUpdated(const std::vector<DisplaySnapshot*>& displays);
43 49
44 // Callback to ConfigureDisplaysTask used to process the result of a display 50 // Callback to ConfigureDisplaysTask used to process the result of a display
45 // configuration run. 51 // configuration run.
46 void OnStateEntered(ConfigureDisplaysTask::Status status); 52 void OnStateEntered(ConfigureDisplaysTask::Status status);
47 53
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool force_configure_; 91 bool force_configure_;
86 92
87 // Used to signal that the task has finished. 93 // Used to signal that the task has finished.
88 ResponseCallback callback_; 94 ResponseCallback callback_;
89 95
90 bool force_dpms_; 96 bool force_dpms_;
91 97
92 // List of updated displays. 98 // List of updated displays.
93 std::vector<DisplaySnapshot*> cached_displays_; 99 std::vector<DisplaySnapshot*> cached_displays_;
94 100
101 // Vector of unowned VirtualDisplaySnapshots to be added when doing the task.
102 std::vector<DisplaySnapshot*> virtual_display_snapshots_;
103
95 gfx::Size framebuffer_size_; 104 gfx::Size framebuffer_size_;
96 105
97 scoped_ptr<ConfigureDisplaysTask> configure_task_; 106 scoped_ptr<ConfigureDisplaysTask> configure_task_;
98 107
99 base::WeakPtrFactory<UpdateDisplayConfigurationTask> weak_ptr_factory_; 108 base::WeakPtrFactory<UpdateDisplayConfigurationTask> weak_ptr_factory_;
100 109
101 DISALLOW_COPY_AND_ASSIGN(UpdateDisplayConfigurationTask); 110 DISALLOW_COPY_AND_ASSIGN(UpdateDisplayConfigurationTask);
102 }; 111 };
103 112
104 } // namespace ui 113 } // namespace ui
105 114
106 #endif // UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ 115 #endif // UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_
OLDNEW
« no previous file with comments | « ui/display/chromeos/query_content_protection_task.cc ('k') | ui/display/chromeos/update_display_configuration_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698