summaryrefslogtreecommitdiffstats
path: root/ash/accelerators
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-12 20:38:01 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-12 20:38:01 +0000
commit3cd198a2911ac90e70e50b4c5e34ee3982ea9769 (patch)
tree5aeb1cfb14fd64d76320425c3a076fc07c0c427d /ash/accelerators
parent349f10bc01e0062c55d60a861972bac252cfb7ce (diff)
downloadchromium_src-3cd198a2911ac90e70e50b4c5e34ee3982ea9769.zip
chromium_src-3cd198a2911ac90e70e50b4c5e34ee3982ea9769.tar.gz
chromium_src-3cd198a2911ac90e70e50b4c5e34ee3982ea9769.tar.bz2
Basic skeleton of a window/layer/view inspector.
Ctrl+Shift+F1 brings it up. http://crbug.com/97266 TEST=none Review URL: https://chromiumcodereview.appspot.com/9662022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126207 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators')
-rw-r--r--ash/accelerators/accelerator_controller.cc7
-rw-r--r--ash/accelerators/accelerator_table.cc1
-rw-r--r--ash/accelerators/accelerator_table.h1
3 files changed, 9 insertions, 0 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index f05d25b..0eb7ce8 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -5,6 +5,7 @@
#include "ash/accelerators/accelerator_controller.h"
#include "ash/accelerators/accelerator_table.h"
+#include "ash/ash_switches.h"
#include "ash/caps_lock_delegate.h"
#include "ash/ime_control_delegate.h"
#include "ash/launcher/launcher.h"
@@ -17,6 +18,7 @@
#include "ash/volume_control_delegate.h"
#include "ash/wm/window_cycle_controller.h"
#include "ash/wm/window_util.h"
+#include "base/command_line.h"
#include "ui/aura/event.h"
#include "ui/aura/root_window.h"
#include "ui/base/accelerators/accelerator.h"
@@ -25,6 +27,7 @@
#include "ui/gfx/compositor/layer_animation_sequence.h"
#include "ui/gfx/compositor/layer_animator.h"
#include "ui/gfx/compositor/screen_rotation.h"
+#include "ui/oak/oak.h"
namespace {
@@ -260,6 +263,10 @@ bool AcceleratorController::AcceleratorPressed(
if (volume_control_delegate_.get())
return volume_control_delegate_->HandleVolumeUp(accelerator);
break;
+ case SHOW_OAK:
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshEnableOak))
+ oak::ShowOakWindow();
+ break;
case NEXT_IME:
if (ime_control_delegate_.get())
return ime_control_delegate_->HandleNextIme();
diff --git a/ash/accelerators/accelerator_table.cc b/ash/accelerators/accelerator_table.cc
index e6efc5c..ba9ed05 100644
--- a/ash/accelerators/accelerator_table.cc
+++ b/ash/accelerators/accelerator_table.cc
@@ -67,6 +67,7 @@ const AcceleratorData kAcceleratorData[] = {
{ ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_F10, false, false, false, VOLUME_UP },
{ ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_VOLUME_UP, false, false, false,
VOLUME_UP },
+ { ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_F1, true, true, false, SHOW_OAK },
#if !defined(NDEBUG)
{ ui::ET_TRANSLATED_KEY_PRESS, ui::VKEY_HOME, false, true, false,
ROTATE_SCREEN },
diff --git a/ash/accelerators/accelerator_table.h b/ash/accelerators/accelerator_table.h
index 97f7a53..31f5a70 100644
--- a/ash/accelerators/accelerator_table.h
+++ b/ash/accelerators/accelerator_table.h
@@ -26,6 +26,7 @@ enum AcceleratorAction {
VOLUME_DOWN,
VOLUME_MUTE,
VOLUME_UP,
+ SHOW_OAK,
#if defined(OS_CHROMEOS)
LOCK_SCREEN,
#endif