| 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 #include "ui/views/accessible_pane_view.h" | 5 #include "ui/views/accessible_pane_view.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "ui/base/accessibility/accessible_view_state.h" | 8 #include "ui/base/accessibility/accessible_view_state.h" |
| 9 #include "ui/views/focus/focus_search.h" | 9 #include "ui/views/focus/focus_search.h" |
| 10 #include "ui/views/focus/view_storage.h" | 10 #include "ui/views/focus/view_storage.h" |
| 11 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
| 12 | 12 |
| 13 namespace views { | 13 namespace views { |
| 14 | 14 |
| 15 AccessiblePaneView::AccessiblePaneView() | 15 AccessiblePaneView::AccessiblePaneView() |
| 16 : pane_has_focus_(false), | 16 : pane_has_focus_(false), |
| 17 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), | 17 ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)), |
| 18 focus_manager_(NULL), | 18 focus_manager_(NULL), |
| 19 home_key_(ui::VKEY_HOME, ui::EF_NONE), | 19 home_key_(ui::VKEY_HOME, ui::EF_NONE, ui::ET_KEY_PRESSED), |
| 20 end_key_(ui::VKEY_END, ui::EF_NONE), | 20 end_key_(ui::VKEY_END, ui::EF_NONE, ui::ET_KEY_PRESSED), |
| 21 escape_key_(ui::VKEY_ESCAPE, ui::EF_NONE), | 21 escape_key_(ui::VKEY_ESCAPE, ui::EF_NONE, ui::ET_KEY_PRESSED), |
| 22 left_key_(ui::VKEY_LEFT, ui::EF_NONE), | 22 left_key_(ui::VKEY_LEFT, ui::EF_NONE, ui::ET_KEY_PRESSED), |
| 23 right_key_(ui::VKEY_RIGHT, ui::EF_NONE) { | 23 right_key_(ui::VKEY_RIGHT, ui::EF_NONE, ui::ET_KEY_PRESSED) { |
| 24 focus_search_.reset(new views::FocusSearch(this, true, true)); | 24 focus_search_.reset(new views::FocusSearch(this, true, true)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 AccessiblePaneView::~AccessiblePaneView() { | 27 AccessiblePaneView::~AccessiblePaneView() { |
| 28 if (pane_has_focus_) { | 28 if (pane_has_focus_) { |
| 29 focus_manager_->RemoveFocusChangeListener(this); | 29 focus_manager_->RemoveFocusChangeListener(this); |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool AccessiblePaneView::SetPaneFocus(views::View* initial_focus) { | 33 bool AccessiblePaneView::SetPaneFocus(views::View* initial_focus) { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 DCHECK(pane_has_focus_); | 198 DCHECK(pane_has_focus_); |
| 199 return NULL; | 199 return NULL; |
| 200 } | 200 } |
| 201 | 201 |
| 202 views::View* AccessiblePaneView::GetFocusTraversableParentView() { | 202 views::View* AccessiblePaneView::GetFocusTraversableParentView() { |
| 203 DCHECK(pane_has_focus_); | 203 DCHECK(pane_has_focus_); |
| 204 return NULL; | 204 return NULL; |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace views | 207 } // namespace views |
| OLD | NEW |