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 "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "base/json/json_string_value_serializer.h" | 10 #include "base/json/json_string_value_serializer.h" |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 label_container_->SetVisible(false); | 364 label_container_->SetVisible(false); |
365 content->AddChildView(label_container_); | 365 content->AddChildView(label_container_); |
366 } | 366 } |
367 | 367 |
368 TouchHudDebug::~TouchHudDebug() { | 368 TouchHudDebug::~TouchHudDebug() { |
369 } | 369 } |
370 | 370 |
371 // static | 371 // static |
372 scoped_ptr<DictionaryValue> TouchHudDebug::GetAllAsDictionary() { | 372 scoped_ptr<DictionaryValue> TouchHudDebug::GetAllAsDictionary() { |
373 scoped_ptr<DictionaryValue> value(new DictionaryValue()); | 373 scoped_ptr<DictionaryValue> value(new DictionaryValue()); |
374 aura::Window::Windows roots = Shell::GetInstance()->GetAllRootWindows(); | 374 Shell::RootWindowList roots = Shell::GetInstance()->GetAllRootWindows(); |
375 for (aura::Window::Windows::iterator iter = roots.begin(); | 375 for (Shell::RootWindowList::iterator iter = roots.begin(); |
376 iter != roots.end(); ++iter) { | 376 iter != roots.end(); ++iter) { |
377 internal::RootWindowController* controller = GetRootWindowController(*iter); | 377 internal::RootWindowController* controller = GetRootWindowController(*iter); |
378 internal::TouchHudDebug* hud = controller->touch_hud_debug(); | 378 internal::TouchHudDebug* hud = controller->touch_hud_debug(); |
379 if (hud) { | 379 if (hud) { |
380 scoped_ptr<ListValue> list = hud->GetLogAsList(); | 380 scoped_ptr<ListValue> list = hud->GetLogAsList(); |
381 if (!list->empty()) | 381 if (!list->empty()) |
382 value->Set(base::Int64ToString(hud->display_id()), list.release()); | 382 value->Set(base::Int64ToString(hud->display_id()), list.release()); |
383 } | 383 } |
384 } | 384 } |
385 return value.Pass(); | 385 return value.Pass(); |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 controller->set_touch_hud_debug(this); | 481 controller->set_touch_hud_debug(this); |
482 } | 482 } |
483 | 483 |
484 void TouchHudDebug::UnsetHudForRootWindowController( | 484 void TouchHudDebug::UnsetHudForRootWindowController( |
485 RootWindowController* controller) { | 485 RootWindowController* controller) { |
486 controller->set_touch_hud_debug(NULL); | 486 controller->set_touch_hud_debug(NULL); |
487 } | 487 } |
488 | 488 |
489 } // namespace internal | 489 } // namespace internal |
490 } // namespace ash | 490 } // namespace ash |
OLD | NEW |