| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_BROWSER_VIEWS_ACCESSIBLE_TOOLBAR_VIEW_H_ | 5 #ifndef CHROME_BROWSER_VIEWS_ACCESSIBLE_TOOLBAR_VIEW_H_ |
| 6 #define CHROME_BROWSER_VIEWS_ACCESSIBLE_TOOLBAR_VIEW_H_ | 6 #define CHROME_BROWSER_VIEWS_ACCESSIBLE_TOOLBAR_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
| 10 #include "base/scoped_ptr.h" |
| 10 #include "base/task.h" | 11 #include "base/task.h" |
| 11 #include "chrome/browser/views/accessibility_event_router_views.h" | |
| 12 #include "views/focus/focus_manager.h" | 12 #include "views/focus/focus_manager.h" |
| 13 #include "views/view.h" | 13 #include "views/view.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 class FocusSearch; | 16 class FocusSearch; |
| 17 } | 17 } |
| 18 | 18 |
| 19 // This class provides keyboard access to any view that extends it, typically | 19 // This class provides keyboard access to any view that extends it, typically |
| 20 // a toolbar. The user sets focus to a control in this view by pressing | 20 // a toolbar. The user sets focus to a control in this view by pressing |
| 21 // F6 to traverse all panes, or by pressing a shortcut that jumps directly | 21 // F6 to traverse all panes, or by pressing a shortcut that jumps directly |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 ScopedRunnableMethodFactory<AccessibleToolbarView> method_factory_; | 73 ScopedRunnableMethodFactory<AccessibleToolbarView> method_factory_; |
| 74 | 74 |
| 75 // Save the focus manager rather than calling GetFocusManager(), | 75 // Save the focus manager rather than calling GetFocusManager(), |
| 76 // so that we can remove focus listeners in the destructor. | 76 // so that we can remove focus listeners in the destructor. |
| 77 views::FocusManager* focus_manager_; | 77 views::FocusManager* focus_manager_; |
| 78 | 78 |
| 79 // Our custom focus search implementation that traps focus in this | 79 // Our custom focus search implementation that traps focus in this |
| 80 // toolbar and traverses all views that are focusable for accessibility, | 80 // toolbar and traverses all views that are focusable for accessibility, |
| 81 // not just those that are normally focusable. | 81 // not just those that are normally focusable. |
| 82 views::FocusSearch focus_search_; | 82 scoped_ptr<views::FocusSearch> focus_search_; |
| 83 | 83 |
| 84 // Registered accelerators | 84 // Registered accelerators |
| 85 views::Accelerator home_key_; | 85 views::Accelerator home_key_; |
| 86 views::Accelerator end_key_; | 86 views::Accelerator end_key_; |
| 87 views::Accelerator escape_key_; | 87 views::Accelerator escape_key_; |
| 88 views::Accelerator left_key_; | 88 views::Accelerator left_key_; |
| 89 views::Accelerator right_key_; | 89 views::Accelerator right_key_; |
| 90 | 90 |
| 91 // Last focused view that issued this traversal. | 91 // Last focused view that issued this traversal. |
| 92 int last_focused_view_storage_id_; | 92 int last_focused_view_storage_id_; |
| 93 | 93 |
| 94 DISALLOW_COPY_AND_ASSIGN(AccessibleToolbarView); | 94 DISALLOW_COPY_AND_ASSIGN(AccessibleToolbarView); |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 #endif // CHROME_BROWSER_VIEWS_ACCESSIBLE_TOOLBAR_VIEW_H_ | 97 #endif // CHROME_BROWSER_VIEWS_ACCESSIBLE_TOOLBAR_VIEW_H_ |
| OLD | NEW |