| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/display_manager_test_api.h" | 5 #include "ui/display/test/display_manager_test_api.h" |
| 6 | 6 |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 return display_manager_->SetDisplayMode(id, mode); | 140 return display_manager_->SetDisplayMode(id, mode); |
| 141 } | 141 } |
| 142 | 142 |
| 143 void DisplayManagerTestApi::SetTouchSupport( | 143 void DisplayManagerTestApi::SetTouchSupport( |
| 144 int64_t display_id, | 144 int64_t display_id, |
| 145 Display::TouchSupport touch_support) { | 145 Display::TouchSupport touch_support) { |
| 146 display_manager_->FindDisplayForId(display_id) | 146 display_manager_->FindDisplayForId(display_id) |
| 147 ->set_touch_support(touch_support); | 147 ->set_touch_support(touch_support); |
| 148 } | 148 } |
| 149 | 149 |
| 150 ScopedDisable125DSFForUIScaling::ScopedDisable125DSFForUIScaling() { | |
| 151 ManagedDisplayInfo::SetUse125DSFForUIScalingForTest(false); | |
| 152 } | |
| 153 | |
| 154 ScopedDisable125DSFForUIScaling::~ScopedDisable125DSFForUIScaling() { | |
| 155 ManagedDisplayInfo::SetUse125DSFForUIScalingForTest(true); | |
| 156 } | |
| 157 | |
| 158 ScopedSetInternalDisplayId::ScopedSetInternalDisplayId( | 150 ScopedSetInternalDisplayId::ScopedSetInternalDisplayId( |
| 159 DisplayManager* display_manager, | 151 DisplayManager* display_manager, |
| 160 int64_t id) { | 152 int64_t id) { |
| 161 DisplayManagerTestApi(display_manager).SetInternalDisplayId(id); | 153 DisplayManagerTestApi(display_manager).SetInternalDisplayId(id); |
| 162 } | 154 } |
| 163 | 155 |
| 164 ScopedSetInternalDisplayId::~ScopedSetInternalDisplayId() { | 156 ScopedSetInternalDisplayId::~ScopedSetInternalDisplayId() { |
| 165 Display::SetInternalDisplayId(kInvalidDisplayId); | 157 Display::SetInternalDisplayId(kInvalidDisplayId); |
| 166 } | 158 } |
| 167 | 159 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 for (size_t i = 0; i < count; i++) { | 193 for (size_t i = 0; i < count; i++) { |
| 202 int64_t id = va_arg(args, int64_t); | 194 int64_t id = va_arg(args, int64_t); |
| 203 list.push_back(id); | 195 list.push_back(id); |
| 204 } | 196 } |
| 205 SortDisplayIdList(&list); | 197 SortDisplayIdList(&list); |
| 206 return list; | 198 return list; |
| 207 } | 199 } |
| 208 | 200 |
| 209 } // namespace test | 201 } // namespace test |
| 210 } // namespace display | 202 } // namespace display |
| OLD | NEW |