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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 10414064: Handle more browser commands in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build of ShellDelegateImpl Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 2ee47e7aa692f7bcc391e8f5e3bf9321750eee0a..f09ec9911e83a0ca43c5595b7fcb3f93a733ae58 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -81,6 +81,11 @@ bool HandleExit() {
return true;
}
+bool HandleNewTab() {
+ ash::Shell::GetInstance()->delegate()->NewTab();
+ return true;
+}
+
bool HandleNewWindow(bool is_incognito) {
ash::ShellDelegate* delegate = ash::Shell::GetInstance()->delegate();
if (!delegate)
@@ -89,6 +94,16 @@ bool HandleNewWindow(bool is_incognito) {
return true;
}
+bool HandleRestoreTab() {
+ ash::Shell::GetInstance()->delegate()->RestoreTab();
+ return true;
+}
+
+bool HandleShowTaskManager() {
+ ash::Shell::GetInstance()->delegate()->ShowTaskManager();
+ return true;
+}
+
// Rotates the default window container.
bool HandleRotateWindows() {
aura::Window* target = ash::Shell::GetInstance()->GetContainer(
@@ -315,8 +330,12 @@ bool AcceleratorController::AcceleratorPressed(
return HandleExit();
case NEW_INCOGNITO_WINDOW:
return HandleNewWindow(true /* is_incognito */);
+ case NEW_TAB:
+ return HandleNewTab();
case NEW_WINDOW:
return HandleNewWindow(false /* is_incognito */);
+ case RESTORE_TAB:
+ return HandleRestoreTab();
case TAKE_SCREENSHOT:
if (screenshot_delegate_.get()) {
aura::RootWindow* root_window = Shell::GetRootWindow();
@@ -379,6 +398,8 @@ bool AcceleratorController::AcceleratorPressed(
return true;
}
break;
+ case SHOW_TASK_MANAGER:
+ return HandleShowTaskManager();
case NEXT_IME:
if (ime_control_delegate_.get())
return ime_control_delegate_->HandleNextIme();
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698