OLD | NEW |
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 "chrome/browser/ui/views/dom_view.h" | 5 #include "chrome/browser/ui/views/dom_view.h" |
6 | 6 |
7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
8 #include "chrome/browser/renderer_preferences_util.h" | 8 #include "chrome/browser/renderer_preferences_util.h" |
9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" | 9 #include "chrome/browser/ui/views/tab_contents/tab_contents_view_views.h" |
10 #include "content/browser/tab_contents/tab_contents.h" | 10 #include "content/browser/tab_contents/tab_contents.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 } | 47 } |
48 | 48 |
49 TabContents* DOMView::CreateTabContents(Profile* profile, | 49 TabContents* DOMView::CreateTabContents(Profile* profile, |
50 SiteInstance* instance) { | 50 SiteInstance* instance) { |
51 return new TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL); | 51 return new TabContents(profile, instance, MSG_ROUTING_NONE, NULL, NULL); |
52 } | 52 } |
53 | 53 |
54 void DOMView::LoadURL(const GURL& url) { | 54 void DOMView::LoadURL(const GURL& url) { |
55 DCHECK(initialized_); | 55 DCHECK(initialized_); |
56 dom_contents_->tab_contents()->controller().LoadURL( | 56 dom_contents_->tab_contents()->controller().LoadURL( |
57 url, GURL(), PageTransition::START_PAGE, std::string()); | 57 url, GURL(), content::PAGE_TRANSITION_START_PAGE, std::string()); |
58 } | 58 } |
59 | 59 |
60 bool DOMView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { | 60 bool DOMView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) { |
61 // Don't move the focus to the next view when tab is pressed, we want the | 61 // Don't move the focus to the next view when tab is pressed, we want the |
62 // key event to be propagated to the render view for doing the tab traversal | 62 // key event to be propagated to the render view for doing the tab traversal |
63 // there. | 63 // there. |
64 return views::FocusManager::IsTabTraversalKeyEvent(e); | 64 return views::FocusManager::IsTabTraversalKeyEvent(e); |
65 } | 65 } |
66 | 66 |
67 void DOMView::OnFocus() { | 67 void DOMView::OnFocus() { |
(...skipping 15 matching lines...) Expand all Loading... |
83 if (views::Widget::IsPureViews()) { | 83 if (views::Widget::IsPureViews()) { |
84 TabContentsViewViews* widget = static_cast<TabContentsViewViews*>( | 84 TabContentsViewViews* widget = static_cast<TabContentsViewViews*>( |
85 dom_contents_->tab_contents()->view()); | 85 dom_contents_->tab_contents()->view()); |
86 views::NativeWidgetViews* nwv = | 86 views::NativeWidgetViews* nwv = |
87 static_cast<views::NativeWidgetViews*>(widget->native_widget()); | 87 static_cast<views::NativeWidgetViews*>(widget->native_widget()); |
88 AttachToView(nwv->GetView()); | 88 AttachToView(nwv->GetView()); |
89 } else { | 89 } else { |
90 Attach(dom_contents_->tab_contents()->GetNativeView()); | 90 Attach(dom_contents_->tab_contents()->GetNativeView()); |
91 } | 91 } |
92 } | 92 } |
OLD | NEW |