| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |