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

Side by Side Diff: ui/views/accessible_pane_view.cc

Issue 9402018: Experimental Extension Keybinding (first cut). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 10 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return false; 53 return false;
54 54
55 focus_manager_->SetFocusedView(initial_focus); 55 focus_manager_->SetFocusedView(initial_focus);
56 56
57 // If we already have pane focus, we're done. 57 // If we already have pane focus, we're done.
58 if (pane_has_focus_) 58 if (pane_has_focus_)
59 return true; 59 return true;
60 60
61 // Otherwise, set accelerators and start listening for focus change events. 61 // Otherwise, set accelerators and start listening for focus change events.
62 pane_has_focus_ = true; 62 pane_has_focus_ = true;
63 focus_manager_->RegisterAccelerator(home_key_, this); 63 focus_manager_->RegisterAccelerator(home_key_, false, this);
64 focus_manager_->RegisterAccelerator(end_key_, this); 64 focus_manager_->RegisterAccelerator(end_key_, false, this);
65 focus_manager_->RegisterAccelerator(escape_key_, this); 65 focus_manager_->RegisterAccelerator(escape_key_, false, this);
66 focus_manager_->RegisterAccelerator(left_key_, this); 66 focus_manager_->RegisterAccelerator(left_key_, false, this);
67 focus_manager_->RegisterAccelerator(right_key_, this); 67 focus_manager_->RegisterAccelerator(right_key_, false, this);
68 focus_manager_->AddFocusChangeListener(this); 68 focus_manager_->AddFocusChangeListener(this);
69 69
70 return true; 70 return true;
71 } 71 }
72 72
73 bool AccessiblePaneView::SetPaneFocusAndFocusDefault() { 73 bool AccessiblePaneView::SetPaneFocusAndFocusDefault() {
74 return SetPaneFocus(GetDefaultFocusableChild()); 74 return SetPaneFocus(GetDefaultFocusableChild());
75 } 75 }
76 76
77 views::View* AccessiblePaneView::GetDefaultFocusableChild() { 77 views::View* AccessiblePaneView::GetDefaultFocusableChild() {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 DCHECK(pane_has_focus_); 196 DCHECK(pane_has_focus_);
197 return NULL; 197 return NULL;
198 } 198 }
199 199
200 views::View* AccessiblePaneView::GetFocusTraversableParentView() { 200 views::View* AccessiblePaneView::GetFocusTraversableParentView() {
201 DCHECK(pane_has_focus_); 201 DCHECK(pane_has_focus_);
202 return NULL; 202 return NULL;
203 } 203 }
204 204
205 } // namespace views 205 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698