| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |