Chromium Code Reviews| 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_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 Loading... | |
| 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 void set_virtual_display_snapshots(std::vector<DisplaySnapshot*> snapshots) { | |
| 39 virtual_display_snapshots_ = snapshots; | |
| 40 } | |
|
oshima
2015/11/24 22:19:27
please document ownership
robert.bradford
2015/11/26 16:29:40
Done. And the comment with the actual vector decla
| |
| 41 | |
| 38 void Run(); | 42 void Run(); |
| 39 | 43 |
| 40 private: | 44 private: |
| 41 // Callback to NativeDisplayDelegate::GetDisplays(). | 45 // Callback to NativeDisplayDelegate::GetDisplays(). |
| 42 void OnDisplaysUpdated(const std::vector<DisplaySnapshot*>& displays); | 46 void OnDisplaysUpdated(const std::vector<DisplaySnapshot*>& displays); |
| 43 | 47 |
| 44 // Callback to ConfigureDisplaysTask used to process the result of a display | 48 // Callback to ConfigureDisplaysTask used to process the result of a display |
| 45 // configuration run. | 49 // configuration run. |
| 46 void OnStateEntered(ConfigureDisplaysTask::Status status); | 50 void OnStateEntered(ConfigureDisplaysTask::Status status); |
| 47 | 51 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 bool force_configure_; | 89 bool force_configure_; |
| 86 | 90 |
| 87 // Used to signal that the task has finished. | 91 // Used to signal that the task has finished. |
| 88 ResponseCallback callback_; | 92 ResponseCallback callback_; |
| 89 | 93 |
| 90 bool force_dpms_; | 94 bool force_dpms_; |
| 91 | 95 |
| 92 // List of updated displays. | 96 // List of updated displays. |
| 93 std::vector<DisplaySnapshot*> cached_displays_; | 97 std::vector<DisplaySnapshot*> cached_displays_; |
| 94 | 98 |
| 99 // Unowned vector of virtual displays to be added when doing the task. | |
| 100 std::vector<DisplaySnapshot*> virtual_display_snapshots_; | |
| 101 | |
| 95 gfx::Size framebuffer_size_; | 102 gfx::Size framebuffer_size_; |
| 96 | 103 |
| 97 scoped_ptr<ConfigureDisplaysTask> configure_task_; | 104 scoped_ptr<ConfigureDisplaysTask> configure_task_; |
| 98 | 105 |
| 99 base::WeakPtrFactory<UpdateDisplayConfigurationTask> weak_ptr_factory_; | 106 base::WeakPtrFactory<UpdateDisplayConfigurationTask> weak_ptr_factory_; |
| 100 | 107 |
| 101 DISALLOW_COPY_AND_ASSIGN(UpdateDisplayConfigurationTask); | 108 DISALLOW_COPY_AND_ASSIGN(UpdateDisplayConfigurationTask); |
| 102 }; | 109 }; |
| 103 | 110 |
| 104 } // namespace ui | 111 } // namespace ui |
| 105 | 112 |
| 106 #endif // UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ | 113 #endif // UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ |
| OLD | NEW |