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

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

Issue 2911393002: Nix GetRootWindowController, use RootWindowController::ForWindow. (Closed)
Patch Set: Sync and rebase AGAIN Created 3 years, 6 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
« no previous file with comments | « ash/system/toast/toast_overlay.cc ('k') | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_hud_debug.h" 5 #include "ash/touch/touch_hud_debug.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 label_container_->SetVisible(false); 350 label_container_->SetVisible(false);
351 content->AddChildView(label_container_); 351 content->AddChildView(label_container_);
352 } 352 }
353 353
354 TouchHudDebug::~TouchHudDebug() {} 354 TouchHudDebug::~TouchHudDebug() {}
355 355
356 // static 356 // static
357 std::unique_ptr<base::DictionaryValue> TouchHudDebug::GetAllAsDictionary() { 357 std::unique_ptr<base::DictionaryValue> TouchHudDebug::GetAllAsDictionary() {
358 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); 358 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue());
359 aura::Window::Windows roots = Shell::Get()->GetAllRootWindows(); 359 aura::Window::Windows roots = Shell::Get()->GetAllRootWindows();
360 for (aura::Window::Windows::iterator iter = roots.begin(); 360 for (RootWindowController* root : Shell::GetAllRootWindowControllers()) {
361 iter != roots.end(); ++iter) { 361 TouchHudDebug* hud = root->touch_hud_debug();
362 RootWindowController* controller = GetRootWindowController(*iter);
363 TouchHudDebug* hud = controller->touch_hud_debug();
364 if (hud) { 362 if (hud) {
365 std::unique_ptr<base::ListValue> list = hud->GetLogAsList(); 363 std::unique_ptr<base::ListValue> list = hud->GetLogAsList();
366 if (!list->empty()) 364 if (!list->empty())
367 value->Set(base::Int64ToString(hud->display_id()), std::move(list)); 365 value->Set(base::Int64ToString(hud->display_id()), std::move(list));
368 } 366 }
369 } 367 }
370 return value; 368 return value;
371 } 369 }
372 370
373 void TouchHudDebug::ChangeToNextMode() { 371 void TouchHudDebug::ChangeToNextMode() {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 RootWindowController* controller) { 462 RootWindowController* controller) {
465 controller->set_touch_hud_debug(this); 463 controller->set_touch_hud_debug(this);
466 } 464 }
467 465
468 void TouchHudDebug::UnsetHudForRootWindowController( 466 void TouchHudDebug::UnsetHudForRootWindowController(
469 RootWindowController* controller) { 467 RootWindowController* controller) {
470 controller->set_touch_hud_debug(NULL); 468 controller->set_touch_hud_debug(NULL);
471 } 469 }
472 470
473 } // namespace ash 471 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/toast/toast_overlay.cc ('k') | ash/touch/touch_observer_hud.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698