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

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

Issue 9662022: Basic skeleton of a window/layer/view inspector. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/accelerators/accelerator_table.h » ('j') | ui/oak/oak.gyp » ('J')
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/caps_lock_delegate.h" 9 #include "ash/caps_lock_delegate.h"
9 #include "ash/ime_control_delegate.h" 10 #include "ash/ime_control_delegate.h"
10 #include "ash/launcher/launcher.h" 11 #include "ash/launcher/launcher.h"
11 #include "ash/launcher/launcher_model.h" 12 #include "ash/launcher/launcher_model.h"
12 #include "ash/screenshot_delegate.h" 13 #include "ash/screenshot_delegate.h"
13 #include "ash/shell.h" 14 #include "ash/shell.h"
14 #include "ash/shell_delegate.h" 15 #include "ash/shell_delegate.h"
15 #include "ash/shell_window_ids.h" 16 #include "ash/shell_window_ids.h"
16 #include "ash/system/brightness/brightness_control_delegate.h" 17 #include "ash/system/brightness/brightness_control_delegate.h"
17 #include "ash/volume_control_delegate.h" 18 #include "ash/volume_control_delegate.h"
18 #include "ash/wm/window_cycle_controller.h" 19 #include "ash/wm/window_cycle_controller.h"
19 #include "ash/wm/window_util.h" 20 #include "ash/wm/window_util.h"
21 #include "base/command_line.h"
20 #include "ui/aura/event.h" 22 #include "ui/aura/event.h"
21 #include "ui/aura/root_window.h" 23 #include "ui/aura/root_window.h"
22 #include "ui/base/accelerators/accelerator.h" 24 #include "ui/base/accelerators/accelerator.h"
23 #include "ui/base/accelerators/accelerator_manager.h" 25 #include "ui/base/accelerators/accelerator_manager.h"
24 #include "ui/gfx/compositor/debug_utils.h" 26 #include "ui/gfx/compositor/debug_utils.h"
25 #include "ui/gfx/compositor/layer_animation_sequence.h" 27 #include "ui/gfx/compositor/layer_animation_sequence.h"
26 #include "ui/gfx/compositor/layer_animator.h" 28 #include "ui/gfx/compositor/layer_animator.h"
27 #include "ui/gfx/compositor/screen_rotation.h" 29 #include "ui/gfx/compositor/screen_rotation.h"
30 #include "ui/oak/oak.h"
28 31
29 namespace { 32 namespace {
30 33
31 bool HandleCycleWindow(ash::WindowCycleController::Direction direction, 34 bool HandleCycleWindow(ash::WindowCycleController::Direction direction,
32 bool is_alt_down) { 35 bool is_alt_down) {
33 ash::Shell::GetInstance()-> 36 ash::Shell::GetInstance()->
34 window_cycle_controller()->HandleCycleWindow(direction, is_alt_down); 37 window_cycle_controller()->HandleCycleWindow(direction, is_alt_down);
35 // Always report we handled the key, even if the window didn't change. 38 // Always report we handled the key, even if the window didn't change.
36 return true; 39 return true;
37 } 40 }
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 return volume_control_delegate_->HandleVolumeMute(accelerator); 256 return volume_control_delegate_->HandleVolumeMute(accelerator);
254 break; 257 break;
255 case VOLUME_DOWN: 258 case VOLUME_DOWN:
256 if (volume_control_delegate_.get()) 259 if (volume_control_delegate_.get())
257 return volume_control_delegate_->HandleVolumeDown(accelerator); 260 return volume_control_delegate_->HandleVolumeDown(accelerator);
258 break; 261 break;
259 case VOLUME_UP: 262 case VOLUME_UP:
260 if (volume_control_delegate_.get()) 263 if (volume_control_delegate_.get())
261 return volume_control_delegate_->HandleVolumeUp(accelerator); 264 return volume_control_delegate_->HandleVolumeUp(accelerator);
262 break; 265 break;
266 case SHOW_OAK:
267 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshEnableOak))
268 oak::ShowOakWindow();
269 break;
263 case NEXT_IME: 270 case NEXT_IME:
264 if (ime_control_delegate_.get()) 271 if (ime_control_delegate_.get())
265 return ime_control_delegate_->HandleNextIme(); 272 return ime_control_delegate_->HandleNextIme();
266 break; 273 break;
267 case PREVIOUS_IME: 274 case PREVIOUS_IME:
268 if (ime_control_delegate_.get()) 275 if (ime_control_delegate_.get())
269 return ime_control_delegate_->HandlePreviousIme(); 276 return ime_control_delegate_->HandlePreviousIme();
270 break; 277 break;
271 case SWITCH_IME: 278 case SWITCH_IME:
272 if (ime_control_delegate_.get()) 279 if (ime_control_delegate_.get())
(...skipping 15 matching lines...) Expand all
288 NOTREACHED() << "Unhandled action " << it->second; 295 NOTREACHED() << "Unhandled action " << it->second;
289 } 296 }
290 return false; 297 return false;
291 } 298 }
292 299
293 bool AcceleratorController::CanHandleAccelerators() const { 300 bool AcceleratorController::CanHandleAccelerators() const {
294 return true; 301 return true;
295 } 302 }
296 303
297 } // namespace ash 304 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_table.h » ('j') | ui/oak/oak.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698