OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // the focused view is about to change. | 223 // the focused view is about to change. |
224 void AddFocusChangeListener(FocusChangeListener* listener); | 224 void AddFocusChangeListener(FocusChangeListener* listener); |
225 void RemoveFocusChangeListener(FocusChangeListener* listener); | 225 void RemoveFocusChangeListener(FocusChangeListener* listener); |
226 | 226 |
227 // Returns the AcceleratorTarget that should be activated for the specified | 227 // Returns the AcceleratorTarget that should be activated for the specified |
228 // keyboard accelerator, or NULL if no view is registered for that keyboard | 228 // keyboard accelerator, or NULL if no view is registered for that keyboard |
229 // accelerator. | 229 // accelerator. |
230 ui::AcceleratorTarget* GetCurrentTargetForAccelerator( | 230 ui::AcceleratorTarget* GetCurrentTargetForAccelerator( |
231 const ui::Accelerator& accelertor) const; | 231 const ui::Accelerator& accelertor) const; |
232 | 232 |
233 // Sets the focus to the specified native view. | |
234 virtual void FocusNativeView(gfx::NativeView native_view); | |
235 | |
236 // Clears the native view having the focus. | 233 // Clears the native view having the focus. |
237 virtual void ClearNativeFocus(); | 234 virtual void ClearNativeFocus(); |
238 | 235 |
239 // Convenience method that returns true if the passed |key_event| should | 236 // Convenience method that returns true if the passed |key_event| should |
240 // trigger tab traversal (if it is a TAB key press with or without SHIFT | 237 // trigger tab traversal (if it is a TAB key press with or without SHIFT |
241 // pressed). | 238 // pressed). |
242 static bool IsTabTraversalKeyEvent(const KeyEvent& key_event); | 239 static bool IsTabTraversalKeyEvent(const KeyEvent& key_event); |
243 | 240 |
244 private: | 241 private: |
245 // Returns the next focusable view. | 242 // Returns the next focusable view. |
(...skipping 28 matching lines...) Expand all Loading... |
274 | 271 |
275 // See description above getter. | 272 // See description above getter. |
276 bool is_changing_focus_; | 273 bool is_changing_focus_; |
277 | 274 |
278 DISALLOW_COPY_AND_ASSIGN(FocusManager); | 275 DISALLOW_COPY_AND_ASSIGN(FocusManager); |
279 }; | 276 }; |
280 | 277 |
281 } // namespace views | 278 } // namespace views |
282 | 279 |
283 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 280 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
OLD | NEW |