Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: views/accessible_pane_view.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « views/accessible_pane_view.h ('k') | views/accessible_pane_view_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « views/accessible_pane_view.h ('k') | views/accessible_pane_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698