summaryrefslogtreecommitdiffstats
path: root/ash/accelerators
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 01:49:17 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-25 01:49:17 +0000
commit47686c42b6a34d82c12f8f378be8d52d06875404 (patch)
tree68f3cb78f8afb9fae59e221b0ea38e6b16391f3d /ash/accelerators
parent6e415ff81a1e29024ccfdd5548e7cd6ba4de450e (diff)
downloadchromium_src-47686c42b6a34d82c12f8f378be8d52d06875404.zip
chromium_src-47686c42b6a34d82c12f8f378be8d52d06875404.tar.gz
chromium_src-47686c42b6a34d82c12f8f378be8d52d06875404.tar.bz2
Introduces NewWindowDelegate to create or show windows/tabs that are not part of ash.
BUG=none TBR=phajdan.jr@chromium.org Review URL: https://codereview.chromium.org/30533012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230901 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/accelerators')
-rw-r--r--ash/accelerators/accelerator_controller.cc21
1 files changed, 12 insertions, 9 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index d7ab549..4cc30ed 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -25,6 +25,7 @@
#include "ash/magnifier/magnification_controller.h"
#include "ash/magnifier/partial_magnification_controller.h"
#include "ash/multi_profile_uma.h"
+#include "ash/new_window_delegate.h"
#include "ash/root_window_controller.h"
#include "ash/rotator/screen_rotation.h"
#include "ash/screenshot_delegate.h"
@@ -173,12 +174,12 @@ bool HandleLock() {
}
bool HandleFileManager() {
- Shell::GetInstance()->delegate()->OpenFileManager();
+ Shell::GetInstance()->new_window_delegate()->OpenFileManager();
return true;
}
bool HandleCrosh() {
- Shell::GetInstance()->delegate()->OpenCrosh();
+ Shell::GetInstance()->new_window_delegate()->OpenCrosh();
return true;
}
@@ -616,25 +617,27 @@ bool AcceleratorController::PerformAction(int action,
return true;
#endif
case OPEN_FEEDBACK_PAGE:
- ash::Shell::GetInstance()->delegate()->OpenFeedbackPage();
+ ash::Shell::GetInstance()->new_window_delegate()->OpenFeedbackPage();
return true;
case EXIT:
// UMA metrics are recorded in the handler.
exit_warning_handler_.HandleAccelerator();
return true;
case NEW_INCOGNITO_WINDOW:
- Shell::GetInstance()->delegate()->NewWindow(true /* is_incognito */);
+ Shell::GetInstance()->new_window_delegate()->NewWindow(
+ true /* is_incognito */);
return true;
case NEW_TAB:
if (key_code == ui::VKEY_T)
shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEWTAB_T);
- Shell::GetInstance()->delegate()->NewTab();
+ Shell::GetInstance()->new_window_delegate()->NewTab();
return true;
case NEW_WINDOW:
- Shell::GetInstance()->delegate()->NewWindow(false /* is_incognito */);
+ Shell::GetInstance()->new_window_delegate()->NewWindow(
+ false /* is_incognito */);
return true;
case RESTORE_TAB:
- Shell::GetInstance()->delegate()->RestoreTab();
+ Shell::GetInstance()->new_window_delegate()->RestoreTab();
return true;
case TAKE_SCREENSHOT:
if (screenshot_delegate_.get() &&
@@ -731,7 +734,7 @@ bool AcceleratorController::PerformAction(int action,
case FOCUS_PREVIOUS_PANE:
return HandleRotatePaneFocus(Shell::BACKWARD);
case SHOW_KEYBOARD_OVERLAY:
- ash::Shell::GetInstance()->delegate()->ShowKeyboardOverlay();
+ ash::Shell::GetInstance()->new_window_delegate()->ShowKeyboardOverlay();
return true;
case SHOW_OAK:
if (CommandLine::ForCurrentProcess()->HasSwitch(
@@ -763,7 +766,7 @@ bool AcceleratorController::PerformAction(int action,
break;
}
case SHOW_TASK_MANAGER:
- Shell::GetInstance()->delegate()->ShowTaskManager();
+ Shell::GetInstance()->new_window_delegate()->ShowTaskManager();
return true;
case NEXT_IME:
// This check is necessary e.g. not to process the Shift+Alt+