OLD | NEW |
1 // Copyright (c) 2012 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 "content/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1139 // This is set before initializing the render manager since | 1139 // This is set before initializing the render manager since |
1140 // RenderFrameHostManager::Init calls back into us via its delegate to ask if | 1140 // RenderFrameHostManager::Init calls back into us via its delegate to ask if |
1141 // it should be hidden. | 1141 // it should be hidden. |
1142 should_normally_be_visible_ = !params.initially_hidden; | 1142 should_normally_be_visible_ = !params.initially_hidden; |
1143 | 1143 |
1144 GetRenderManager()->Init( | 1144 GetRenderManager()->Init( |
1145 params.browser_context, params.site_instance, params.routing_id, | 1145 params.browser_context, params.site_instance, params.routing_id, |
1146 params.main_frame_routing_id); | 1146 params.main_frame_routing_id); |
1147 | 1147 |
1148 WebContentsViewDelegate* delegate = | 1148 WebContentsViewDelegate* delegate = |
1149 GetContentClient()->browser()->GetWebContentsViewDelegate(this); | 1149 GetContentClient()->browser()->GetWebContentsViewDelegate(this, |
| 1150 params.context); |
1150 | 1151 |
1151 if (browser_plugin_guest_) { | 1152 if (browser_plugin_guest_) { |
1152 scoped_ptr<WebContentsView> platform_view(CreateWebContentsView( | 1153 scoped_ptr<WebContentsView> platform_view(CreateWebContentsView( |
1153 this, delegate, &render_view_host_delegate_view_)); | 1154 this, delegate, &render_view_host_delegate_view_)); |
1154 | 1155 |
1155 WebContentsViewGuest* rv = new WebContentsViewGuest( | 1156 WebContentsViewGuest* rv = new WebContentsViewGuest( |
1156 this, browser_plugin_guest_.get(), platform_view.Pass(), | 1157 this, browser_plugin_guest_.get(), platform_view.Pass(), |
1157 render_view_host_delegate_view_); | 1158 render_view_host_delegate_view_); |
1158 render_view_host_delegate_view_ = rv; | 1159 render_view_host_delegate_view_ = rv; |
1159 view_.reset(rv); | 1160 view_.reset(rv); |
(...skipping 3165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4325 node->render_manager()->ResumeResponseDeferredAtStart(); | 4326 node->render_manager()->ResumeResponseDeferredAtStart(); |
4326 } | 4327 } |
4327 | 4328 |
4328 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4329 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4329 force_disable_overscroll_content_ = force_disable; | 4330 force_disable_overscroll_content_ = force_disable; |
4330 if (view_) | 4331 if (view_) |
4331 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4332 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4332 } | 4333 } |
4333 | 4334 |
4334 } // namespace content | 4335 } // namespace content |
OLD | NEW |