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

Side by Side Diff: ash/accelerators/accelerator_controller.cc

Issue 10546024: Add RootWindowController (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | ash/ash.gyp » ('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 (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"
11 #include "ash/focus_cycler.h" 11 #include "ash/focus_cycler.h"
12 #include "ash/ime_control_delegate.h" 12 #include "ash/ime_control_delegate.h"
13 #include "ash/launcher/launcher.h" 13 #include "ash/launcher/launcher.h"
14 #include "ash/launcher/launcher_delegate.h" 14 #include "ash/launcher/launcher_delegate.h"
15 #include "ash/launcher/launcher_model.h" 15 #include "ash/launcher/launcher_model.h"
16 #include "ash/monitor/monitor_controller.h" 16 #include "ash/monitor/monitor_controller.h"
17 #include "ash/monitor/multi_monitor_manager.h" 17 #include "ash/monitor/multi_monitor_manager.h"
18 #include "ash/root_window_controller.h"
18 #include "ash/screenshot_delegate.h" 19 #include "ash/screenshot_delegate.h"
19 #include "ash/shell.h" 20 #include "ash/shell.h"
20 #include "ash/shell_delegate.h" 21 #include "ash/shell_delegate.h"
21 #include "ash/shell_window_ids.h" 22 #include "ash/shell_window_ids.h"
22 #include "ash/system/brightness/brightness_control_delegate.h" 23 #include "ash/system/brightness/brightness_control_delegate.h"
23 #include "ash/system/tray/system_tray.h" 24 #include "ash/system/tray/system_tray.h"
24 #include "ash/volume_control_delegate.h" 25 #include "ash/volume_control_delegate.h"
25 #include "ash/wm/property_util.h" 26 #include "ash/wm/property_util.h"
26 #include "ash/wm/window_cycle_controller.h" 27 #include "ash/wm/window_cycle_controller.h"
27 #include "ash/wm/window_util.h" 28 #include "ash/wm/window_util.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return true; 106 return true;
106 } 107 }
107 108
108 bool HandleShowTaskManager() { 109 bool HandleShowTaskManager() {
109 Shell::GetInstance()->delegate()->ShowTaskManager(); 110 Shell::GetInstance()->delegate()->ShowTaskManager();
110 return true; 111 return true;
111 } 112 }
112 113
113 // Rotates the default window container. 114 // Rotates the default window container.
114 bool HandleRotateWindows() { 115 bool HandleRotateWindows() {
115 aura::Window* target = Shell::GetContainer( 116 aura::Window* target =
116 Shell::GetPrimaryRootWindow(), 117 Shell::GetPrimaryRootWindowController()->GetContainer(
117 internal::kShellWindowId_DefaultContainer); 118 internal::kShellWindowId_DefaultContainer);
118 scoped_ptr<ui::LayerAnimationSequence> screen_rotation( 119 scoped_ptr<ui::LayerAnimationSequence> screen_rotation(
119 new ui::LayerAnimationSequence(new ui::ScreenRotation(360))); 120 new ui::LayerAnimationSequence(new ui::ScreenRotation(360)));
120 target->layer()->GetAnimator()->StartAnimation( 121 target->layer()->GetAnimator()->StartAnimation(
121 screen_rotation.release()); 122 screen_rotation.release());
122 return true; 123 return true;
123 } 124 }
124 125
125 #if !defined(NDEBUG) 126 #if !defined(NDEBUG)
126 // Rotates the screen. 127 // Rotates the screen.
127 bool HandleRotateScreen() { 128 bool HandleRotateScreen() {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 std::string indent_str(indent, ' '); 185 std::string indent_str(indent, ' ');
185 DLOG(INFO) << indent_str << window->name() << " type " << window->type() 186 DLOG(INFO) << indent_str << window->name() << " type " << window->type()
186 << (wm::IsActiveWindow(window) ? "active" : ""); 187 << (wm::IsActiveWindow(window) ? "active" : "");
187 for (size_t i = 0; i < window->children().size(); ++i) 188 for (size_t i = 0; i < window->children().size(); ++i)
188 PrintWindowHierarchy(window->children()[i], indent + 3); 189 PrintWindowHierarchy(window->children()[i], indent + 3);
189 } 190 }
190 191
191 bool HandlePrintWindowHierarchy() { 192 bool HandlePrintWindowHierarchy() {
192 DLOG(INFO) << "Window hierarchy:"; 193 DLOG(INFO) << "Window hierarchy:";
193 aura::Window* container = 194 aura::Window* container =
194 Shell::GetContainer(Shell::GetPrimaryRootWindow(), 195 Shell::GetPrimaryRootWindowController()->GetContainer(
195 internal::kShellWindowId_DefaultContainer); 196 internal::kShellWindowId_DefaultContainer);
196 PrintWindowHierarchy(container, 0); 197 PrintWindowHierarchy(container, 0);
197 return true; 198 return true;
198 } 199 }
199 200
200 #endif // !defined(NDEBUG) 201 #endif // !defined(NDEBUG)
201 202
202 } // namespace 203 } // namespace
203 204
204 //////////////////////////////////////////////////////////////////////////////// 205 ////////////////////////////////////////////////////////////////////////////////
205 // AcceleratorController, public: 206 // AcceleratorController, public:
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 // Then set this one as active. 561 // Then set this one as active.
561 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index); 562 Shell::GetInstance()->launcher()->ActivateLauncherItem(found_index);
562 } 563 }
563 } 564 }
564 565
565 bool AcceleratorController::CanHandleAccelerators() const { 566 bool AcceleratorController::CanHandleAccelerators() const {
566 return true; 567 return true;
567 } 568 }
568 569
569 } // namespace ash 570 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698