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

Side by Side Diff: ash/touch/touch_transformer_controller.cc

Issue 1638413007: Use list instead of pair to represent the set of displays. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build error Created 4 years, 10 months 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 #include "ash/touch/touch_transformer_controller.h" 5 #include "ash/touch/touch_transformer_controller.h"
6 6
7 #include "ash/display/display_manager.h" 7 #include "ash/display/display_manager.h"
8 #include "ash/display/window_tree_host_manager.h" 8 #include "ash/display/window_tree_host_manager.h"
9 #include "ash/host/ash_window_tree_host.h" 9 #include "ash/host/ash_window_tree_host.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 DisplayManager* display_manager = GetDisplayManager(); 167 DisplayManager* display_manager = GetDisplayManager();
168 if (display_manager->num_connected_displays() == 0) { 168 if (display_manager->num_connected_displays() == 0) {
169 return; 169 return;
170 } else if (display_manager->num_connected_displays() == 1 || 170 } else if (display_manager->num_connected_displays() == 1 ||
171 display_manager->IsInUnifiedMode()) { 171 display_manager->IsInUnifiedMode()) {
172 single_display_id = display_manager->first_display_id(); 172 single_display_id = display_manager->first_display_id();
173 DCHECK(single_display_id != gfx::Display::kInvalidDisplayID); 173 DCHECK(single_display_id != gfx::Display::kInvalidDisplayID);
174 single_display = display_manager->GetDisplayInfo(single_display_id); 174 single_display = display_manager->GetDisplayInfo(single_display_id);
175 UpdateTouchRadius(single_display); 175 UpdateTouchRadius(single_display);
176 } else { 176 } else {
177 DisplayIdPair id_pair = display_manager->GetCurrentDisplayIdPair(); 177 DisplayIdList list = display_manager->GetCurrentDisplayIdList();
178 display1_id = id_pair.first; 178 display1_id = list[0];
179 display2_id = id_pair.second; 179 display2_id = list[1];
180 DCHECK(display1_id != gfx::Display::kInvalidDisplayID && 180 DCHECK(display1_id != gfx::Display::kInvalidDisplayID &&
181 display2_id != gfx::Display::kInvalidDisplayID); 181 display2_id != gfx::Display::kInvalidDisplayID);
182 display1 = display_manager->GetDisplayInfo(display1_id); 182 display1 = display_manager->GetDisplayInfo(display1_id);
183 display2 = display_manager->GetDisplayInfo(display2_id); 183 display2 = display_manager->GetDisplayInfo(display2_id);
184 UpdateTouchRadius(display1); 184 UpdateTouchRadius(display1);
185 UpdateTouchRadius(display2); 185 UpdateTouchRadius(display2);
186 } 186 }
187 187
188 gfx::Size fb_size = 188 gfx::Size fb_size =
189 Shell::GetInstance()->display_configurator()->framebuffer_size(); 189 Shell::GetInstance()->display_configurator()->framebuffer_size();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void TouchTransformerController::OnDisplaysInitialized() { 223 void TouchTransformerController::OnDisplaysInitialized() {
224 UpdateTouchTransformer(); 224 UpdateTouchTransformer();
225 } 225 }
226 226
227 void TouchTransformerController::OnDisplayConfigurationChanged() { 227 void TouchTransformerController::OnDisplayConfigurationChanged() {
228 UpdateTouchTransformer(); 228 UpdateTouchTransformer();
229 } 229 }
230 230
231 } // namespace ash 231 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698