| 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 "ash/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
| 8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
| 9 #include "ash/caps_lock_delegate.h" | 9 #include "ash/caps_lock_delegate.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 bool HandlePrintLayerHierarchy() { | 166 bool HandlePrintLayerHierarchy() { |
| 167 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow(); | 167 aura::RootWindow* root_window = ash::Shell::GetPrimaryRootWindow(); |
| 168 ui::PrintLayerHierarchy(root_window->layer(), | 168 ui::PrintLayerHierarchy(root_window->layer(), |
| 169 root_window->last_mouse_location()); | 169 root_window->last_mouse_location()); |
| 170 return true; | 170 return true; |
| 171 } | 171 } |
| 172 | 172 |
| 173 void PrintWindowHierarchy(aura::Window* window, int indent) { | 173 void PrintWindowHierarchy(aura::Window* window, int indent) { |
| 174 std::string indent_str(indent, ' '); | 174 std::string indent_str(indent, ' '); |
| 175 DLOG(INFO) << indent_str << window->name() << " type " << window->type() | 175 VLOG(1) << indent_str << window->name() << " type " << window->type() |
| 176 << (ash::wm::IsActiveWindow(window) ? "active" : ""); | 176 << (ash::wm::IsActiveWindow(window) ? "active" : ""); |
| 177 for (size_t i = 0; i < window->children().size(); ++i) | 177 for (size_t i = 0; i < window->children().size(); ++i) |
| 178 PrintWindowHierarchy(window->children()[i], indent + 3); | 178 PrintWindowHierarchy(window->children()[i], indent + 3); |
| 179 } | 179 } |
| 180 | 180 |
| 181 bool HandlePrintWindowHierarchy() { | 181 bool HandlePrintWindowHierarchy() { |
| 182 DLOG(INFO) << "Window hierarchy:"; | 182 VLOG(1) << "Window hierarchy:"; |
| 183 aura::Window* container = ash::Shell::GetInstance()->GetContainer( | 183 aura::Window* container = ash::Shell::GetInstance()->GetContainer( |
| 184 ash::internal::kShellWindowId_DefaultContainer); | 184 ash::internal::kShellWindowId_DefaultContainer); |
| 185 PrintWindowHierarchy(container, 0); | 185 PrintWindowHierarchy(container, 0); |
| 186 return true; | 186 return true; |
| 187 } | 187 } |
| 188 | 188 |
| 189 #endif // !defined(NDEBUG) | 189 #endif |
| 190 | 190 |
| 191 } // namespace | 191 } // namespace |
| 192 | 192 |
| 193 namespace ash { | 193 namespace ash { |
| 194 | 194 |
| 195 //////////////////////////////////////////////////////////////////////////////// | 195 //////////////////////////////////////////////////////////////////////////////// |
| 196 // AcceleratorController, public: | 196 // AcceleratorController, public: |
| 197 | 197 |
| 198 AcceleratorController::AcceleratorController() | 198 AcceleratorController::AcceleratorController() |
| 199 : accelerator_manager_(new ui::AcceleratorManager) { | 199 : accelerator_manager_(new ui::AcceleratorManager) { |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 // Then set this one as active. | 539 // Then set this one as active. |
| 540 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); | 540 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); |
| 541 } | 541 } |
| 542 } | 542 } |
| 543 | 543 |
| 544 bool AcceleratorController::CanHandleAccelerators() const { | 544 bool AcceleratorController::CanHandleAccelerators() const { |
| 545 return true; | 545 return true; |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace ash | 548 } // namespace ash |
| OLD | NEW |