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

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

Issue 2192613002: Moves NewWindowDelegate to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: order Created 4 years, 4 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
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/common/accelerators/accelerator_controller.h" 5 #include "ash/common/accelerators/accelerator_controller.h"
6 6
7 #include "ash/common/accelerators/accelerator_commands.h" 7 #include "ash/common/accelerators/accelerator_commands.h"
8 #include "ash/common/accelerators/accelerator_controller_delegate.h" 8 #include "ash/common/accelerators/accelerator_controller_delegate.h"
9 #include "ash/common/accelerators/debug_commands.h" 9 #include "ash/common/accelerators/debug_commands.h"
10 #include "ash/common/accessibility_delegate.h" 10 #include "ash/common/accessibility_delegate.h"
11 #include "ash/common/accessibility_types.h" 11 #include "ash/common/accessibility_types.h"
12 #include "ash/common/focus_cycler.h" 12 #include "ash/common/focus_cycler.h"
13 #include "ash/common/ime_control_delegate.h" 13 #include "ash/common/ime_control_delegate.h"
14 #include "ash/common/media_delegate.h" 14 #include "ash/common/media_delegate.h"
15 #include "ash/common/multi_profile_uma.h" 15 #include "ash/common/multi_profile_uma.h"
16 #include "ash/common/new_window_delegate.h"
16 #include "ash/common/session/session_state_delegate.h" 17 #include "ash/common/session/session_state_delegate.h"
17 #include "ash/common/shell_delegate.h" 18 #include "ash/common/shell_delegate.h"
18 #include "ash/common/system/brightness_control_delegate.h" 19 #include "ash/common/system/brightness_control_delegate.h"
19 #include "ash/common/system/keyboard_brightness_control_delegate.h" 20 #include "ash/common/system/keyboard_brightness_control_delegate.h"
20 #include "ash/common/system/tray/system_tray_delegate.h" 21 #include "ash/common/system/tray/system_tray_delegate.h"
21 #include "ash/common/system/tray/system_tray_notifier.h" 22 #include "ash/common/system/tray/system_tray_notifier.h"
22 #include "ash/common/system/volume_control_delegate.h" 23 #include "ash/common/system/volume_control_delegate.h"
23 #include "ash/common/wm/mru_window_tracker.h" 24 #include "ash/common/wm/mru_window_tracker.h"
24 #include "ash/common/wm/overview/window_selector_controller.h" 25 #include "ash/common/wm/overview/window_selector_controller.h"
25 #include "ash/common/wm/window_cycle_controller.h" 26 #include "ash/common/wm/window_cycle_controller.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 99 }
99 100
100 void HandleMediaPlayPause() { 101 void HandleMediaPlayPause() {
101 WmShell::Get()->media_delegate()->HandleMediaPlayPause(); 102 WmShell::Get()->media_delegate()->HandleMediaPlayPause();
102 } 103 }
103 104
104 void HandleMediaPrevTrack() { 105 void HandleMediaPrevTrack() {
105 WmShell::Get()->media_delegate()->HandleMediaPrevTrack(); 106 WmShell::Get()->media_delegate()->HandleMediaPrevTrack();
106 } 107 }
107 108
109 bool CanHandleNewIncognitoWindow() {
110 return WmShell::Get()->delegate()->IsIncognitoAllowed();
111 }
112
113 void HandleNewIncognitoWindow() {
114 base::RecordAction(UserMetricsAction("Accel_New_Incognito_Window"));
115 WmShell::Get()->new_window_delegate()->NewWindow(true /* is_incognito */);
116 }
117
118 void HandleNewTab(const ui::Accelerator& accelerator) {
119 if (accelerator.key_code() == ui::VKEY_T)
120 base::RecordAction(UserMetricsAction("Accel_NewTab_T"));
121 WmShell::Get()->new_window_delegate()->NewTab();
122 }
123
124 void HandleNewWindow() {
125 base::RecordAction(UserMetricsAction("Accel_New_Window"));
126 WmShell::Get()->new_window_delegate()->NewWindow(false /* is_incognito */);
127 }
128
108 bool CanHandleNextIme(ImeControlDelegate* ime_control_delegate) { 129 bool CanHandleNextIme(ImeControlDelegate* ime_control_delegate) {
109 return ime_control_delegate && ime_control_delegate->CanCycleIme(); 130 return ime_control_delegate && ime_control_delegate->CanCycleIme();
110 } 131 }
111 132
112 // We must avoid showing the Deprecated NEXT_IME notification erronously. 133 // We must avoid showing the Deprecated NEXT_IME notification erronously.
113 bool ShouldShowDeprecatedNextImeNotification( 134 bool ShouldShowDeprecatedNextImeNotification(
114 const ui::Accelerator& previous_accelerator) { 135 const ui::Accelerator& previous_accelerator) {
115 // We only show the deprecation notification if the previous accelerator key 136 // We only show the deprecation notification if the previous accelerator key
116 // is ONLY either Shift, or Alt. 137 // is ONLY either Shift, or Alt.
117 const ui::KeyboardCode previous_key_code = previous_accelerator.key_code(); 138 const ui::KeyboardCode previous_key_code = previous_accelerator.key_code();
118 switch (previous_key_code) { 139 switch (previous_key_code) {
119 case ui::VKEY_SHIFT: 140 case ui::VKEY_SHIFT:
120 case ui::VKEY_LSHIFT: 141 case ui::VKEY_LSHIFT:
121 case ui::VKEY_RSHIFT: 142 case ui::VKEY_RSHIFT:
122 case ui::VKEY_MENU: 143 case ui::VKEY_MENU:
123 case ui::VKEY_LMENU: 144 case ui::VKEY_LMENU:
124 case ui::VKEY_RMENU: 145 case ui::VKEY_RMENU:
125 return true; 146 return true;
126 147
127 default: 148 default:
128 return false; 149 return false;
129 } 150 }
130 } 151 }
131 152
132 void HandleNextIme(ImeControlDelegate* ime_control_delegate) { 153 void HandleNextIme(ImeControlDelegate* ime_control_delegate) {
133 base::RecordAction(UserMetricsAction("Accel_Next_Ime")); 154 base::RecordAction(UserMetricsAction("Accel_Next_Ime"));
134 ime_control_delegate->HandleNextIme(); 155 ime_control_delegate->HandleNextIme();
135 } 156 }
136 157
158 void HandleOpenFeedbackPage() {
159 base::RecordAction(UserMetricsAction("Accel_Open_Feedback_Page"));
160 WmShell::Get()->new_window_delegate()->OpenFeedbackPage();
161 }
162
137 bool CanHandlePreviousIme(ImeControlDelegate* ime_control_delegate) { 163 bool CanHandlePreviousIme(ImeControlDelegate* ime_control_delegate) {
138 return ime_control_delegate && ime_control_delegate->CanCycleIme(); 164 return ime_control_delegate && ime_control_delegate->CanCycleIme();
139 } 165 }
140 166
141 void HandlePreviousIme(ImeControlDelegate* ime_control_delegate, 167 void HandlePreviousIme(ImeControlDelegate* ime_control_delegate,
142 const ui::Accelerator& accelerator) { 168 const ui::Accelerator& accelerator) {
143 base::RecordAction(UserMetricsAction("Accel_Previous_Ime")); 169 base::RecordAction(UserMetricsAction("Accel_Previous_Ime"));
144 if (accelerator.type() == ui::ET_KEY_PRESSED) 170 if (accelerator.type() == ui::ET_KEY_PRESSED)
145 ime_control_delegate->HandlePreviousIme(); 171 ime_control_delegate->HandlePreviousIme();
146 // Else: consume the Ctrl+Space ET_KEY_RELEASED event but do not do anything. 172 // Else: consume the Ctrl+Space ET_KEY_RELEASED event but do not do anything.
147 } 173 }
148 174
175 void HandleRestoreTab() {
176 base::RecordAction(UserMetricsAction("Accel_Restore_Tab"));
177 WmShell::Get()->new_window_delegate()->RestoreTab();
178 }
179
180 void HandleShowKeyboardOverlay() {
181 base::RecordAction(UserMetricsAction("Accel_Show_Keyboard_Overlay"));
182 WmShell::Get()->new_window_delegate()->ShowKeyboardOverlay();
183 }
184
185 void HandleShowTaskManager() {
186 base::RecordAction(UserMetricsAction("Accel_Show_Task_Manager"));
187 WmShell::Get()->new_window_delegate()->ShowTaskManager();
188 }
189
149 bool CanHandleSwitchIme(ImeControlDelegate* ime_control_delegate, 190 bool CanHandleSwitchIme(ImeControlDelegate* ime_control_delegate,
150 const ui::Accelerator& accelerator) { 191 const ui::Accelerator& accelerator) {
151 return ime_control_delegate && 192 return ime_control_delegate &&
152 ime_control_delegate->CanSwitchIme(accelerator); 193 ime_control_delegate->CanSwitchIme(accelerator);
153 } 194 }
154 195
155 void HandleSwitchIme(ImeControlDelegate* ime_control_delegate, 196 void HandleSwitchIme(ImeControlDelegate* ime_control_delegate,
156 const ui::Accelerator& accelerator) { 197 const ui::Accelerator& accelerator) {
157 base::RecordAction(UserMetricsAction("Accel_Switch_Ime")); 198 base::RecordAction(UserMetricsAction("Accel_Switch_Ime"));
158 ime_control_delegate->HandleSwitchIme(accelerator); 199 ime_control_delegate->HandleSwitchIme(accelerator);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 WmWindow* active_window = WmShell::Get()->GetActiveWindow(); 245 WmWindow* active_window = WmShell::Get()->GetActiveWindow();
205 return (active_window && !active_window->GetWindowState()->IsDocked()); 246 return (active_window && !active_window->GetWindowState()->IsDocked());
206 } 247 }
207 248
208 void HandlePositionCenter() { 249 void HandlePositionCenter() {
209 base::RecordAction(UserMetricsAction("Accel_Window_Position_Center")); 250 base::RecordAction(UserMetricsAction("Accel_Window_Position_Center"));
210 wm::CenterWindow(WmShell::Get()->GetActiveWindow()); 251 wm::CenterWindow(WmShell::Get()->GetActiveWindow());
211 } 252 }
212 253
213 #if defined(OS_CHROMEOS) 254 #if defined(OS_CHROMEOS)
255 void HandleCrosh() {
256 base::RecordAction(UserMetricsAction("Accel_Open_Crosh"));
257
258 WmShell::Get()->new_window_delegate()->OpenCrosh();
259 }
260
214 bool CanHandleDisableCapsLock(const ui::Accelerator& previous_accelerator) { 261 bool CanHandleDisableCapsLock(const ui::Accelerator& previous_accelerator) {
215 ui::KeyboardCode previous_key_code = previous_accelerator.key_code(); 262 ui::KeyboardCode previous_key_code = previous_accelerator.key_code();
216 if (previous_accelerator.type() == ui::ET_KEY_RELEASED || 263 if (previous_accelerator.type() == ui::ET_KEY_RELEASED ||
217 (previous_key_code != ui::VKEY_LSHIFT && 264 (previous_key_code != ui::VKEY_LSHIFT &&
218 previous_key_code != ui::VKEY_SHIFT && 265 previous_key_code != ui::VKEY_SHIFT &&
219 previous_key_code != ui::VKEY_RSHIFT)) { 266 previous_key_code != ui::VKEY_RSHIFT)) {
220 // If something else was pressed between the Shift key being pressed 267 // If something else was pressed between the Shift key being pressed
221 // and released, then ignore the release of the Shift key. 268 // and released, then ignore the release of the Shift key.
222 return false; 269 return false;
223 } 270 }
224 chromeos::input_method::InputMethodManager* ime = 271 chromeos::input_method::InputMethodManager* ime =
225 chromeos::input_method::InputMethodManager::Get(); 272 chromeos::input_method::InputMethodManager::Get();
226 chromeos::input_method::ImeKeyboard* keyboard = 273 chromeos::input_method::ImeKeyboard* keyboard =
227 ime ? ime->GetImeKeyboard() : NULL; 274 ime ? ime->GetImeKeyboard() : NULL;
228 return (keyboard && keyboard->CapsLockIsEnabled()); 275 return (keyboard && keyboard->CapsLockIsEnabled());
229 } 276 }
230 277
231 void HandleDisableCapsLock() { 278 void HandleDisableCapsLock() {
232 base::RecordAction(UserMetricsAction("Accel_Disable_Caps_Lock")); 279 base::RecordAction(UserMetricsAction("Accel_Disable_Caps_Lock"));
233 chromeos::input_method::InputMethodManager* ime = 280 chromeos::input_method::InputMethodManager* ime =
234 chromeos::input_method::InputMethodManager::Get(); 281 chromeos::input_method::InputMethodManager::Get();
235 ime->GetImeKeyboard()->SetCapsLockEnabled(false); 282 ime->GetImeKeyboard()->SetCapsLockEnabled(false);
236 } 283 }
237 284
285 void HandleFileManager() {
286 base::RecordAction(UserMetricsAction("Accel_Open_File_Manager"));
287
288 WmShell::Get()->new_window_delegate()->OpenFileManager();
289 }
290
291 void HandleGetHelp() {
292 WmShell::Get()->new_window_delegate()->OpenGetHelp();
293 }
294
238 bool CanHandleLock() { 295 bool CanHandleLock() {
239 return WmShell::Get()->GetSessionStateDelegate()->CanLockScreen(); 296 return WmShell::Get()->GetSessionStateDelegate()->CanLockScreen();
240 } 297 }
241 298
242 void HandleLock() { 299 void HandleLock() {
243 base::RecordAction(UserMetricsAction("Accel_LockScreen_L")); 300 base::RecordAction(UserMetricsAction("Accel_LockScreen_L"));
244 WmShell::Get()->GetSessionStateDelegate()->LockScreen(); 301 WmShell::Get()->GetSessionStateDelegate()->LockScreen();
245 } 302 }
246 303
247 void HandleSuspend() { 304 void HandleSuspend() {
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 accelerator_history_->previous_accelerator(); 618 accelerator_history_->previous_accelerator();
562 619
563 // True should be returned if running |action| does something. Otherwise, 620 // True should be returned if running |action| does something. Otherwise,
564 // false should be returned to give the web contents a chance at handling the 621 // false should be returned to give the web contents a chance at handling the
565 // accelerator. 622 // accelerator.
566 switch (action) { 623 switch (action) {
567 case DEBUG_PRINT_LAYER_HIERARCHY: 624 case DEBUG_PRINT_LAYER_HIERARCHY:
568 case DEBUG_PRINT_VIEW_HIERARCHY: 625 case DEBUG_PRINT_VIEW_HIERARCHY:
569 case DEBUG_PRINT_WINDOW_HIERARCHY: 626 case DEBUG_PRINT_WINDOW_HIERARCHY:
570 return debug::DebugAcceleratorsEnabled(); 627 return debug::DebugAcceleratorsEnabled();
628 case NEW_INCOGNITO_WINDOW:
629 return CanHandleNewIncognitoWindow();
571 case NEXT_IME: 630 case NEXT_IME:
572 return CanHandleNextIme(ime_control_delegate_.get()); 631 return CanHandleNextIme(ime_control_delegate_.get());
573 case PREVIOUS_IME: 632 case PREVIOUS_IME:
574 return CanHandlePreviousIme(ime_control_delegate_.get()); 633 return CanHandlePreviousIme(ime_control_delegate_.get());
575 case SWITCH_IME: 634 case SWITCH_IME:
576 return CanHandleSwitchIme(ime_control_delegate_.get(), accelerator); 635 return CanHandleSwitchIme(ime_control_delegate_.get(), accelerator);
577 case WINDOW_CYCLE_SNAP_DOCK_LEFT: 636 case WINDOW_CYCLE_SNAP_DOCK_LEFT:
578 case WINDOW_CYCLE_SNAP_DOCK_RIGHT: 637 case WINDOW_CYCLE_SNAP_DOCK_RIGHT:
579 return CanHandleWindowSnapOrDock(); 638 return CanHandleWindowSnapOrDock();
580 case WINDOW_POSITION_CENTER: 639 case WINDOW_POSITION_CENTER:
(...skipping 15 matching lines...) Expand all
596 return CanHandleToggleCapsLock(accelerator, previous_accelerator); 655 return CanHandleToggleCapsLock(accelerator, previous_accelerator);
597 #endif 656 #endif
598 case CYCLE_BACKWARD_MRU: 657 case CYCLE_BACKWARD_MRU:
599 case CYCLE_FORWARD_MRU: 658 case CYCLE_FORWARD_MRU:
600 case EXIT: 659 case EXIT:
601 case FOCUS_NEXT_PANE: 660 case FOCUS_NEXT_PANE:
602 case FOCUS_PREVIOUS_PANE: 661 case FOCUS_PREVIOUS_PANE:
603 case MEDIA_NEXT_TRACK: 662 case MEDIA_NEXT_TRACK:
604 case MEDIA_PLAY_PAUSE: 663 case MEDIA_PLAY_PAUSE:
605 case MEDIA_PREV_TRACK: 664 case MEDIA_PREV_TRACK:
665 case NEW_TAB:
666 case NEW_WINDOW:
667 case OPEN_FEEDBACK_PAGE:
606 case PRINT_UI_HIERARCHIES: 668 case PRINT_UI_HIERARCHIES:
669 case RESTORE_TAB:
670 case SHOW_KEYBOARD_OVERLAY:
671 case SHOW_TASK_MANAGER:
607 case TOGGLE_FULLSCREEN: 672 case TOGGLE_FULLSCREEN:
608 case TOGGLE_MAXIMIZED: 673 case TOGGLE_MAXIMIZED:
609 case TOGGLE_OVERVIEW: 674 case TOGGLE_OVERVIEW:
610 case WINDOW_MINIMIZE: 675 case WINDOW_MINIMIZE:
611 #if defined(OS_CHROMEOS) 676 #if defined(OS_CHROMEOS)
612 case BRIGHTNESS_DOWN: 677 case BRIGHTNESS_DOWN:
613 case BRIGHTNESS_UP: 678 case BRIGHTNESS_UP:
614 case KEYBOARD_BRIGHTNESS_DOWN: 679 case KEYBOARD_BRIGHTNESS_DOWN:
615 case KEYBOARD_BRIGHTNESS_UP: 680 case KEYBOARD_BRIGHTNESS_UP:
681 case OPEN_CROSH:
682 case OPEN_FILE_MANAGER:
683 case OPEN_GET_HELP:
616 case SUSPEND: 684 case SUSPEND:
617 case TOGGLE_SPOKEN_FEEDBACK: 685 case TOGGLE_SPOKEN_FEEDBACK:
618 case TOGGLE_WIFI: 686 case TOGGLE_WIFI:
619 case VOLUME_DOWN: 687 case VOLUME_DOWN:
620 case VOLUME_MUTE: 688 case VOLUME_MUTE:
621 case VOLUME_UP: 689 case VOLUME_UP:
622 #else 690 #else
623 case DUMMY_FOR_RESERVED: 691 case DUMMY_FOR_RESERVED:
624 #endif 692 #endif
625 return true; 693 return true;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 break; 735 break;
668 case MEDIA_NEXT_TRACK: 736 case MEDIA_NEXT_TRACK:
669 HandleMediaNextTrack(); 737 HandleMediaNextTrack();
670 break; 738 break;
671 case MEDIA_PLAY_PAUSE: 739 case MEDIA_PLAY_PAUSE:
672 HandleMediaPlayPause(); 740 HandleMediaPlayPause();
673 break; 741 break;
674 case MEDIA_PREV_TRACK: 742 case MEDIA_PREV_TRACK:
675 HandleMediaPrevTrack(); 743 HandleMediaPrevTrack();
676 break; 744 break;
745 case NEW_INCOGNITO_WINDOW:
746 HandleNewIncognitoWindow();
747 break;
748 case NEW_TAB:
749 HandleNewTab(accelerator);
750 break;
751 case NEW_WINDOW:
752 HandleNewWindow();
753 break;
677 case NEXT_IME: 754 case NEXT_IME:
678 HandleNextIme(ime_control_delegate_.get()); 755 HandleNextIme(ime_control_delegate_.get());
679 break; 756 break;
757 case OPEN_FEEDBACK_PAGE:
758 HandleOpenFeedbackPage();
759 break;
680 case PREVIOUS_IME: 760 case PREVIOUS_IME:
681 HandlePreviousIme(ime_control_delegate_.get(), accelerator); 761 HandlePreviousIme(ime_control_delegate_.get(), accelerator);
682 break; 762 break;
683 case PRINT_UI_HIERARCHIES: 763 case PRINT_UI_HIERARCHIES:
684 debug::PrintUIHierarchies(); 764 debug::PrintUIHierarchies();
685 break; 765 break;
766 case RESTORE_TAB:
767 HandleRestoreTab();
768 break;
769 case SHOW_KEYBOARD_OVERLAY:
770 HandleShowKeyboardOverlay();
771 break;
772 case SHOW_TASK_MANAGER:
773 HandleShowTaskManager();
774 break;
686 case SWITCH_IME: 775 case SWITCH_IME:
687 HandleSwitchIme(ime_control_delegate_.get(), accelerator); 776 HandleSwitchIme(ime_control_delegate_.get(), accelerator);
688 break; 777 break;
689 case TOGGLE_FULLSCREEN: 778 case TOGGLE_FULLSCREEN:
690 HandleToggleFullscreen(accelerator); 779 HandleToggleFullscreen(accelerator);
691 break; 780 break;
692 case TOGGLE_MAXIMIZED: 781 case TOGGLE_MAXIMIZED:
693 accelerators::ToggleMaximized(); 782 accelerators::ToggleMaximized();
694 break; 783 break;
695 case TOGGLE_OVERVIEW: 784 case TOGGLE_OVERVIEW:
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 case KEYBOARD_BRIGHTNESS_UP: { 828 case KEYBOARD_BRIGHTNESS_UP: {
740 KeyboardBrightnessControlDelegate* delegate = 829 KeyboardBrightnessControlDelegate* delegate =
741 WmShell::Get()->keyboard_brightness_control_delegate(); 830 WmShell::Get()->keyboard_brightness_control_delegate();
742 if (delegate) 831 if (delegate)
743 delegate->HandleKeyboardBrightnessUp(accelerator); 832 delegate->HandleKeyboardBrightnessUp(accelerator);
744 break; 833 break;
745 } 834 }
746 case LOCK_SCREEN: 835 case LOCK_SCREEN:
747 HandleLock(); 836 HandleLock();
748 break; 837 break;
838 case OPEN_CROSH:
839 HandleCrosh();
840 break;
841 case OPEN_FILE_MANAGER:
842 HandleFileManager();
843 break;
844 case OPEN_GET_HELP:
845 HandleGetHelp();
846 break;
749 case SUSPEND: 847 case SUSPEND:
750 HandleSuspend(); 848 HandleSuspend();
751 break; 849 break;
752 case SWITCH_TO_NEXT_USER: 850 case SWITCH_TO_NEXT_USER:
753 HandleCycleUser(SessionStateDelegate::CYCLE_TO_NEXT_USER); 851 HandleCycleUser(SessionStateDelegate::CYCLE_TO_NEXT_USER);
754 break; 852 break;
755 case SWITCH_TO_PREVIOUS_USER: 853 case SWITCH_TO_PREVIOUS_USER:
756 HandleCycleUser(SessionStateDelegate::CYCLE_TO_PREVIOUS_USER); 854 HandleCycleUser(SessionStateDelegate::CYCLE_TO_PREVIOUS_USER);
757 break; 855 break;
758 case TOGGLE_CAPS_LOCK: 856 case TOGGLE_CAPS_LOCK:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() && 926 if (wm_shell->mru_window_tracker()->BuildMruWindowList().empty() &&
829 actions_needing_window_.find(action) != actions_needing_window_.end()) { 927 actions_needing_window_.find(action) != actions_needing_window_.end()) {
830 wm_shell->accessibility_delegate()->TriggerAccessibilityAlert( 928 wm_shell->accessibility_delegate()->TriggerAccessibilityAlert(
831 A11Y_ALERT_WINDOW_NEEDED); 929 A11Y_ALERT_WINDOW_NEEDED);
832 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; 930 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
833 } 931 }
834 return RESTRICTION_NONE; 932 return RESTRICTION_NONE;
835 } 933 }
836 934
837 } // namespace ash 935 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller_delegate_aura.cc ('k') | ash/common/new_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698