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

Side by Side Diff: ui/views/focus/focus_manager.h

Issue 10381145: WIP: Always update ui::AcceleratorManager Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ui/base/accelerators/accelerator_manager.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »
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 #ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 5 #ifndef UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 6 #define UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
7 7
8 #include <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 void SetFocusedViewWithReason(View* view, FocusChangeReason reason); 161 void SetFocusedViewWithReason(View* view, FocusChangeReason reason);
162 void SetFocusedView(View* view) { 162 void SetFocusedView(View* view) {
163 SetFocusedViewWithReason(view, kReasonDirectFocusChange); 163 SetFocusedViewWithReason(view, kReasonDirectFocusChange);
164 } 164 }
165 165
166 // Get the reason why the focus most recently changed. 166 // Get the reason why the focus most recently changed.
167 FocusChangeReason focus_change_reason() const { 167 FocusChangeReason focus_change_reason() const {
168 return focus_change_reason_; 168 return focus_change_reason_;
169 } 169 }
170 170
171 // Gets the AcceleratorManager this FocusManager is associated with.
172 ui::AcceleratorManager* accelerator_manager() const {
173 return accelerator_manager_.get();
174 }
175
171 // Clears the focused view. The window associated with the top root view gets 176 // Clears the focused view. The window associated with the top root view gets
172 // the native focus (so we still get keyboard events). 177 // the native focus (so we still get keyboard events).
173 void ClearFocus(); 178 void ClearFocus();
174 179
175 // Validates the focused view, clearing it if the window it belongs too is not 180 // Validates the focused view, clearing it if the window it belongs too is not
176 // attached to the window hierarchy anymore. 181 // attached to the window hierarchy anymore.
177 void ValidateFocusedView(); 182 void ValidateFocusedView();
178 183
179 // Stores and restores the focused view. Used when the window becomes 184 // Stores and restores the focused view. Used when the window becomes
180 // active/inactive. 185 // active/inactive.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 312
308 // See description above getter. 313 // See description above getter.
309 bool is_changing_focus_; 314 bool is_changing_focus_;
310 315
311 DISALLOW_COPY_AND_ASSIGN(FocusManager); 316 DISALLOW_COPY_AND_ASSIGN(FocusManager);
312 }; 317 };
313 318
314 } // namespace views 319 } // namespace views
315 320
316 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ 321 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_
OLDNEW
« no previous file with comments | « ui/base/accelerators/accelerator_manager.cc ('k') | ui/views/widget/native_widget_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698