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 | 10 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
252 void UnregisterAccelerators(ui::AcceleratorTarget* target); | 252 void UnregisterAccelerators(ui::AcceleratorTarget* target); |
253 | 253 |
254 // Activate the target associated with the specified accelerator. | 254 // Activate the target associated with the specified accelerator. |
255 // First, AcceleratorPressed handler of the most recently registered target | 255 // First, AcceleratorPressed handler of the most recently registered target |
256 // is called, and if that handler processes the event (i.e. returns true), | 256 // is called, and if that handler processes the event (i.e. returns true), |
257 // this method immediately returns. If not, we do the same thing on the next | 257 // this method immediately returns. If not, we do the same thing on the next |
258 // target, and so on. | 258 // target, and so on. |
259 // Returns true if an accelerator was activated. | 259 // Returns true if an accelerator was activated. |
260 bool ProcessAccelerator(const ui::Accelerator& accelerator); | 260 bool ProcessAccelerator(const ui::Accelerator& accelerator); |
261 | 261 |
262 // Returns true if the given |accelerator| has been deprecated and hence can | |
263 // be consumed by web contents if needed. | |
264 bool IsAcceleratorDeprecated(const ui::Accelerator& accelerator) const; | |
sky
2015/06/18 15:25:18
Feels wrong to put this logic in FocusManager when
afakhry
2015/06/19 17:26:54
Deprecated accelerators are in ash. The FocusManag
| |
265 | |
262 // Resets menu key state if |event| is not menu key release. | 266 // Resets menu key state if |event| is not menu key release. |
263 // This is effective only on x11. | 267 // This is effective only on x11. |
264 void MaybeResetMenuKeyState(const ui::KeyEvent& key); | 268 void MaybeResetMenuKeyState(const ui::KeyEvent& key); |
265 | 269 |
266 // Called by a RootView when a view within its hierarchy is removed | 270 // Called by a RootView when a view within its hierarchy is removed |
267 // from its parent. This will only be called by a RootView in a | 271 // from its parent. This will only be called by a RootView in a |
268 // hierarchy of Widgets that this FocusManager is attached to the | 272 // hierarchy of Widgets that this FocusManager is attached to the |
269 // parent Widget of. | 273 // parent Widget of. |
270 void ViewRemoved(View* removed); | 274 void ViewRemoved(View* removed); |
271 | 275 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
366 | 370 |
367 // See description above getter. | 371 // See description above getter. |
368 bool is_changing_focus_; | 372 bool is_changing_focus_; |
369 | 373 |
370 DISALLOW_COPY_AND_ASSIGN(FocusManager); | 374 DISALLOW_COPY_AND_ASSIGN(FocusManager); |
371 }; | 375 }; |
372 | 376 |
373 } // namespace views | 377 } // namespace views |
374 | 378 |
375 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ | 379 #endif // UI_VIEWS_FOCUS_FOCUS_MANAGER_H_ |
OLD | NEW |