| 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" |
| 11 #include "ui/display/chromeos/configure_displays_task.h" | 11 #include "ui/display/chromeos/configure_displays_task.h" |
| 12 #include "ui/display/chromeos/display_configurator.h" | 12 #include "ui/display/chromeos/display_configurator.h" |
| 13 | 13 |
| 14 namespace ui { | 14 namespace ui { |
| 15 | 15 |
| 16 class DisplaySnapshot; | 16 class DisplaySnapshot; |
| 17 class NativeDisplayDelegate; | 17 class NativeDisplayDelegate; |
| 18 | 18 |
| 19 class DISPLAY_EXPORT UpdateDisplayConfigurationTask { | 19 class DISPLAY_EXPORT UpdateDisplayConfigurationTask { |
| 20 public: | 20 public: |
| 21 typedef base::Callback<void( | 21 typedef base::Callback<void( |
| 22 bool /* success */, | 22 bool /* success */, |
| 23 const std::vector<DisplayConfigurator::DisplayState>& /* displays */, | 23 const std::vector<DisplaySnapshot*>& /* displays */, |
| 24 const gfx::Size& /* framebuffer_size */, | 24 const gfx::Size& /* framebuffer_size */, |
| 25 MultipleDisplayState /* new_display_state */, | 25 MultipleDisplayState /* new_display_state */, |
| 26 chromeos::DisplayPowerState /* new_power_state */)> ResponseCallback; | 26 chromeos::DisplayPowerState /* new_power_state */)> ResponseCallback; |
| 27 | 27 |
| 28 UpdateDisplayConfigurationTask( | 28 UpdateDisplayConfigurationTask( |
| 29 NativeDisplayDelegate* delegate, | 29 NativeDisplayDelegate* delegate, |
| 30 DisplayConfigurator::DisplayLayoutManager* layout_manager, | 30 DisplayConfigurator::DisplayLayoutManager* layout_manager, |
| 31 MultipleDisplayState new_display_state, | 31 MultipleDisplayState new_display_state, |
| 32 chromeos::DisplayPowerState new_power_state, | 32 chromeos::DisplayPowerState new_power_state, |
| 33 int power_flags, | 33 int power_flags, |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 uint32_t background_color_argb_; | 84 uint32_t background_color_argb_; |
| 85 | 85 |
| 86 bool force_configure_; | 86 bool force_configure_; |
| 87 | 87 |
| 88 // Used to signal that the task has finished. | 88 // Used to signal that the task has finished. |
| 89 ResponseCallback callback_; | 89 ResponseCallback callback_; |
| 90 | 90 |
| 91 bool force_dpms_; | 91 bool force_dpms_; |
| 92 | 92 |
| 93 // List of updated displays. | 93 // List of updated displays. |
| 94 std::vector<DisplayConfigurator::DisplayState> cached_displays_; | 94 std::vector<DisplaySnapshot*> cached_displays_; |
| 95 | 95 |
| 96 gfx::Size framebuffer_size_; | 96 gfx::Size framebuffer_size_; |
| 97 | 97 |
| 98 scoped_ptr<ConfigureDisplaysTask> configure_task_; | 98 scoped_ptr<ConfigureDisplaysTask> configure_task_; |
| 99 | 99 |
| 100 base::WeakPtrFactory<UpdateDisplayConfigurationTask> weak_ptr_factory_; | 100 base::WeakPtrFactory<UpdateDisplayConfigurationTask> weak_ptr_factory_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(UpdateDisplayConfigurationTask); | 102 DISALLOW_COPY_AND_ASSIGN(UpdateDisplayConfigurationTask); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace ui | 105 } // namespace ui |
| 106 | 106 |
| 107 #endif // UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ | 107 #endif // UI_DISPLAY_CHROMEOS_UPDATE_DISPLAY_CONFIGURATION_TASK_H_ |
| OLD | NEW |