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

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

Issue 786513003: Cleaning up MruWindowTracker::BuildWindowList() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/focus_cycler.cc » ('j') | ash/wm/mru_window_tracker.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 10
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 // be passed to the modal window. This is important for things like 1126 // be passed to the modal window. This is important for things like
1127 // Alt+Tab that would cause an undesired effect in the modal window by 1127 // Alt+Tab that would cause an undesired effect in the modal window by
1128 // cycling through its window elements. 1128 // cycling through its window elements.
1129 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; 1129 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
1130 } 1130 }
1131 if (shell->delegate()->IsRunningInForcedAppMode() && 1131 if (shell->delegate()->IsRunningInForcedAppMode() &&
1132 actions_allowed_in_app_mode_.find(action) == 1132 actions_allowed_in_app_mode_.find(action) ==
1133 actions_allowed_in_app_mode_.end()) { 1133 actions_allowed_in_app_mode_.end()) {
1134 return RESTRICTION_PREVENT_PROCESSING; 1134 return RESTRICTION_PREVENT_PROCESSING;
1135 } 1135 }
1136 if (MruWindowTracker::BuildWindowList(false).empty() && 1136 if (MruWindowTracker::BuildWindowList().empty() &&
1137 actions_needing_window_.find(action) != actions_needing_window_.end()) { 1137 actions_needing_window_.find(action) != actions_needing_window_.end()) {
1138 Shell::GetInstance()->accessibility_delegate()->TriggerAccessibilityAlert( 1138 Shell::GetInstance()->accessibility_delegate()->TriggerAccessibilityAlert(
1139 ui::A11Y_ALERT_WINDOW_NEEDED); 1139 ui::A11Y_ALERT_WINDOW_NEEDED);
1140 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION; 1140 return RESTRICTION_PREVENT_PROCESSING_AND_PROPAGATION;
1141 } 1141 }
1142 return RESTRICTION_NONE; 1142 return RESTRICTION_NONE;
1143 } 1143 }
1144 1144
1145 void AcceleratorController::SetKeyboardBrightnessControlDelegate( 1145 void AcceleratorController::SetKeyboardBrightnessControlDelegate(
1146 scoped_ptr<KeyboardBrightnessControlDelegate> 1146 scoped_ptr<KeyboardBrightnessControlDelegate>
1147 keyboard_brightness_control_delegate) { 1147 keyboard_brightness_control_delegate) {
1148 keyboard_brightness_control_delegate_ = 1148 keyboard_brightness_control_delegate_ =
1149 keyboard_brightness_control_delegate.Pass(); 1149 keyboard_brightness_control_delegate.Pass();
1150 } 1150 }
1151 1151
1152 } // namespace ash 1152 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/focus_cycler.cc » ('j') | ash/wm/mru_window_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698