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

Side by Side Diff: chrome/browser/views/dom_view.cc

Issue 140001: Fix default focus in Gears dialogs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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
« no previous file with comments | « chrome/browser/views/dom_view.h ('k') | no next file » | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/browser/views/dom_view.h" 5 #include "chrome/browser/views/dom_view.h"
6 6
7 #include "chrome/browser/tab_contents/tab_contents.h" 7 #include "chrome/browser/tab_contents/tab_contents.h"
8 #include "views/focus/focus_manager.h" 8 #include "views/focus/focus_manager.h"
9 9
10 DOMView::DOMView() : initialized_(false), tab_contents_(NULL) { 10 DOMView::DOMView() : initialized_(false), tab_contents_(NULL) {
(...skipping 20 matching lines...) Expand all
31 DCHECK(initialized_); 31 DCHECK(initialized_);
32 tab_contents_->controller().LoadURL(url, GURL(), PageTransition::START_PAGE); 32 tab_contents_->controller().LoadURL(url, GURL(), PageTransition::START_PAGE);
33 } 33 }
34 34
35 bool DOMView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { 35 bool DOMView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
36 // Don't move the focus to the next view when tab is pressed, we want the 36 // Don't move the focus to the next view when tab is pressed, we want the
37 // key event to be propagated to the render view for doing the tab traversal 37 // key event to be propagated to the render view for doing the tab traversal
38 // there. 38 // there.
39 return views::FocusManager::IsTabTraversalKeyEvent(e); 39 return views::FocusManager::IsTabTraversalKeyEvent(e);
40 } 40 }
41
42 void DOMView::Focus() {
43 tab_contents_->Focus();
44 }
OLDNEW
« no previous file with comments | « chrome/browser/views/dom_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698