| 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 #include "ui/display/manager/chromeos/configure_displays_task.h" | 5 #include "ui/display/manager/chromeos/configure_displays_task.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "ui/display/manager/chromeos/display_util.h" | 9 #include "ui/display/manager/chromeos/display_util.h" |
| 10 #include "ui/display/types/display_snapshot.h" | 10 #include "ui/display/types/display_snapshot.h" |
| 11 #include "ui/display/types/native_display_delegate.h" | 11 #include "ui/display/types/native_display_delegate.h" |
| 12 | 12 |
| 13 namespace ui { | 13 namespace display { |
| 14 | 14 |
| 15 namespace { | 15 namespace { |
| 16 | 16 |
| 17 // Find the next best mode after |display_mode|. If none can be found return | 17 // Find the next best mode after |display_mode|. If none can be found return |
| 18 // nullptr. | 18 // nullptr. |
| 19 const DisplayMode* FindNextMode(const DisplaySnapshot& display_state, | 19 const DisplayMode* FindNextMode(const DisplaySnapshot& display_state, |
| 20 const DisplayMode* display_mode) { | 20 const DisplayMode* display_mode) { |
| 21 if (!display_mode) | 21 if (!display_mode) |
| 22 return nullptr; | 22 return nullptr; |
| 23 | 23 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 request->display->set_origin(request->origin); | 112 request->display->set_origin(request->origin); |
| 113 } | 113 } |
| 114 | 114 |
| 115 num_displays_configured_++; | 115 num_displays_configured_++; |
| 116 if (!success) | 116 if (!success) |
| 117 task_status_ = ERROR; | 117 task_status_ = ERROR; |
| 118 | 118 |
| 119 Run(); | 119 Run(); |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace ui | 122 } // namespace display |
| OLD | NEW |