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

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2549903002: mash: Reverse the responsibilities of the NewWindowClient. (Closed)
Patch Set: jamescook comments Created 4 years 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 | « ash/BUILD.gn ('k') | ash/common/mojo_interface_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index 6edb692016723679f07d90d2c209e703575a21ae..d3993c22b64df7c6970912999f70aadbdd8f0f58 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -15,6 +15,7 @@
#include "ash/common/ime_control_delegate.h"
#include "ash/common/media_delegate.h"
#include "ash/common/multi_profile_uma.h"
+#include "ash/common/new_window_controller.h"
#include "ash/common/session/session_state_delegate.h"
#include "ash/common/shelf/shelf_widget.h"
#include "ash/common/shelf/wm_shelf.h"
@@ -34,7 +35,6 @@
#include "ash/common/wm_root_window_controller.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
-#include "ash/public/interfaces/new_window.mojom.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/user_metrics.h"
#include "ui/base/accelerators/accelerator.h"
@@ -150,18 +150,18 @@ bool CanHandleNewIncognitoWindow() {
void HandleNewIncognitoWindow() {
base::RecordAction(UserMetricsAction("Accel_New_Incognito_Window"));
- WmShell::Get()->new_window_client()->NewWindow(true /* is_incognito */);
+ WmShell::Get()->new_window_controller()->NewWindow(true /* is_incognito */);
}
void HandleNewTab(const ui::Accelerator& accelerator) {
if (accelerator.key_code() == ui::VKEY_T)
base::RecordAction(UserMetricsAction("Accel_NewTab_T"));
- WmShell::Get()->new_window_client()->NewTab();
+ WmShell::Get()->new_window_controller()->NewTab();
}
void HandleNewWindow() {
base::RecordAction(UserMetricsAction("Accel_New_Window"));
- WmShell::Get()->new_window_client()->NewWindow(false /* is_incognito */);
+ WmShell::Get()->new_window_controller()->NewWindow(false /* is_incognito */);
}
bool CanHandleNextIme(ImeControlDelegate* ime_control_delegate) {
@@ -204,7 +204,7 @@ void HandleNextIme(ImeControlDelegate* ime_control_delegate) {
void HandleOpenFeedbackPage() {
base::RecordAction(UserMetricsAction("Accel_Open_Feedback_Page"));
- WmShell::Get()->new_window_client()->OpenFeedbackPage();
+ WmShell::Get()->new_window_controller()->OpenFeedbackPage();
}
bool CanHandlePreviousIme(ImeControlDelegate* ime_control_delegate) {
@@ -221,12 +221,12 @@ void HandlePreviousIme(ImeControlDelegate* ime_control_delegate,
void HandleRestoreTab() {
base::RecordAction(UserMetricsAction("Accel_Restore_Tab"));
- WmShell::Get()->new_window_client()->RestoreTab();
+ WmShell::Get()->new_window_controller()->RestoreTab();
}
void HandleShowKeyboardOverlay() {
base::RecordAction(UserMetricsAction("Accel_Show_Keyboard_Overlay"));
- WmShell::Get()->new_window_client()->ShowKeyboardOverlay();
+ WmShell::Get()->new_window_controller()->ShowKeyboardOverlay();
}
bool CanHandleShowMessageCenterBubble() {
@@ -252,7 +252,7 @@ void HandleShowMessageCenterBubble() {
void HandleShowTaskManager() {
base::RecordAction(UserMetricsAction("Accel_Show_Task_Manager"));
- WmShell::Get()->new_window_client()->ShowTaskManager();
+ WmShell::Get()->new_window_controller()->ShowTaskManager();
}
bool CanHandleSwitchIme(ImeControlDelegate* ime_control_delegate,
@@ -371,7 +371,7 @@ void HandleShowImeMenuBubble() {
void HandleCrosh() {
base::RecordAction(UserMetricsAction("Accel_Open_Crosh"));
- WmShell::Get()->new_window_client()->OpenCrosh();
+ WmShell::Get()->new_window_controller()->OpenCrosh();
}
bool CanHandleDisableCapsLock(const ui::Accelerator& previous_accelerator) {
@@ -401,11 +401,11 @@ void HandleDisableCapsLock() {
void HandleFileManager() {
base::RecordAction(UserMetricsAction("Accel_Open_File_Manager"));
- WmShell::Get()->new_window_client()->OpenFileManager();
+ WmShell::Get()->new_window_controller()->OpenFileManager();
}
void HandleGetHelp() {
- WmShell::Get()->new_window_client()->OpenGetHelp();
+ WmShell::Get()->new_window_controller()->OpenGetHelp();
}
bool CanHandleLock() {
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/mojo_interface_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698