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 #include "views/accessible_pane_view.h" | 5 #include "views/accessible_pane_view.h" |
6 | 6 |
7 #include "ui/base/accessibility/accessible_view_state.h" | 7 #include "ui/base/accessibility/accessible_view_state.h" |
8 #include "views/focus/focus_search.h" | 8 #include "views/focus/focus_search.h" |
9 #include "views/focus/view_storage.h" | 9 #include "views/focus/view_storage.h" |
10 #include "views/widget/widget.h" | 10 #include "views/widget/widget.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // View overrides: | 108 // View overrides: |
109 | 109 |
110 views::FocusTraversable* AccessiblePaneView::GetPaneFocusTraversable() { | 110 views::FocusTraversable* AccessiblePaneView::GetPaneFocusTraversable() { |
111 if (pane_has_focus_) | 111 if (pane_has_focus_) |
112 return this; | 112 return this; |
113 else | 113 else |
114 return NULL; | 114 return NULL; |
115 } | 115 } |
116 | 116 |
117 bool AccessiblePaneView::AcceleratorPressed( | 117 bool AccessiblePaneView::AcceleratorPressed( |
118 const views::Accelerator& accelerator) { | 118 const ui::Accelerator& accelerator) { |
119 | 119 |
120 const views::View* focused_view = focus_manager_->GetFocusedView(); | 120 const views::View* focused_view = focus_manager_->GetFocusedView(); |
121 if (!Contains(focused_view)) | 121 if (!Contains(focused_view)) |
122 return false; | 122 return false; |
123 | 123 |
124 switch (accelerator.key_code()) { | 124 switch (accelerator.key_code()) { |
125 case ui::VKEY_ESCAPE: | 125 case ui::VKEY_ESCAPE: |
126 RemovePaneFocus(); | 126 RemovePaneFocus(); |
127 focus_manager_->RestoreFocusedView(); | 127 focus_manager_->RestoreFocusedView(); |
128 return true; | 128 return true; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 DCHECK(pane_has_focus_); | 195 DCHECK(pane_has_focus_); |
196 return NULL; | 196 return NULL; |
197 } | 197 } |
198 | 198 |
199 views::View* AccessiblePaneView::GetFocusTraversableParentView() { | 199 views::View* AccessiblePaneView::GetFocusTraversableParentView() { |
200 DCHECK(pane_has_focus_); | 200 DCHECK(pane_has_focus_); |
201 return NULL; | 201 return NULL; |
202 } | 202 } |
203 | 203 |
204 } // namespace views | 204 } // namespace views |
OLD | NEW |