OLD | NEW |
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 #include <memory> | 10 #include <memory> |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 // from its parent. This will only be called by a RootView in a | 270 // from its parent. This will only be called by a RootView in a |
271 // hierarchy of Widgets that this FocusManager is attached to the | 271 // hierarchy of Widgets that this FocusManager is attached to the |
272 // parent Widget of. | 272 // parent Widget of. |
273 void ViewRemoved(View* removed); | 273 void ViewRemoved(View* removed); |
274 | 274 |
275 // Adds/removes a listener. The FocusChangeListener is notified every time | 275 // Adds/removes a listener. The FocusChangeListener is notified every time |
276 // the focused view is about to change. | 276 // the focused view is about to change. |
277 void AddFocusChangeListener(FocusChangeListener* listener); | 277 void AddFocusChangeListener(FocusChangeListener* listener); |
278 void RemoveFocusChangeListener(FocusChangeListener* listener); | 278 void RemoveFocusChangeListener(FocusChangeListener* listener); |
279 | 279 |
280 // Returns the AcceleratorTarget that should be activated for the specified | |
281 // keyboard accelerator, or NULL if no view is registered for that keyboard | |
282 // accelerator. | |
283 ui::AcceleratorTarget* GetCurrentTargetForAccelerator( | |
284 const ui::Accelerator& accelerator) const; | |
285 | |
286 // Whether the given |accelerator| has a priority handler associated with it. | 280 // Whether the given |accelerator| has a priority handler associated with it. |
287 bool HasPriorityHandler(const ui::Accelerator& accelerator) const; | 281 bool HasPriorityHandler(const ui::Accelerator& accelerator) const; |
288 | 282 |
289 // Clears the native view having the focus. | 283 // Clears the native view having the focus. |
290 virtual void ClearNativeFocus(); | 284 virtual void ClearNativeFocus(); |
291 | 285 |
292 // Focuses the next keyboard-accessible pane, taken from the list of | 286 // Focuses the next keyboard-accessible pane, taken from the list of |
293 // views returned by WidgetDelegate::GetAccessiblePanes(). If there are | 287 // views returned by WidgetDelegate::GetAccessiblePanes(). If there are |
294 // no panes, the widget's root view is treated as a single pane. | 288 // no panes, the widget's root view is treated as a single pane. |
295 // A keyboard-accessible pane should subclass from AccessiblePaneView in | 289 // A keyboard-accessible pane should subclass from AccessiblePaneView in |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 363 |
370 // See description above getter. | 364 // See description above getter. |
371 bool is_changing_focus_; | 365 bool is_changing_focus_; |
372 | 366 |
373 DISALLOW_COPY_AND_ASSIGN(FocusManager); | 367 DISALLOW_COPY_AND_ASSIGN(FocusManager); |
374 }; | 368 }; |
375 | 369 |
376 } // namespace views | 370 } // namespace views |
377 | 371 |
378 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 372 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
OLD | NEW |