| 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/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 2961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2972 | 2972 |
| 2973 // Now that the RenderView has been created, we need to tell it its size. | 2973 // Now that the RenderView has been created, we need to tell it its size. |
| 2974 if (rwh_view) | 2974 if (rwh_view) |
| 2975 rwh_view->SetSize(view_->GetContainerSize()); | 2975 rwh_view->SetSize(view_->GetContainerSize()); |
| 2976 | 2976 |
| 2977 // Make sure we use the correct starting page_id in the new RenderView. | 2977 // Make sure we use the correct starting page_id in the new RenderView. |
| 2978 UpdateMaxPageIDIfNecessary(render_view_host); | 2978 UpdateMaxPageIDIfNecessary(render_view_host); |
| 2979 int32 max_page_id = | 2979 int32 max_page_id = |
| 2980 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); | 2980 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); |
| 2981 | 2981 |
| 2982 content::NotificationService::current()->Notify( |
| 2983 content::NOTIFICATION_WILL_CREATE_RENDER_VIEW, |
| 2984 content::Source<WebContents>(this), |
| 2985 content::Details<RenderViewHost>(render_view_host)); |
| 2982 if (!static_cast<RenderViewHostImpl*>( | 2986 if (!static_cast<RenderViewHostImpl*>( |
| 2983 render_view_host)->CreateRenderView(string16(), | 2987 render_view_host)->CreateRenderView(string16(), |
| 2984 opener_route_id, | 2988 opener_route_id, |
| 2985 max_page_id)) { | 2989 max_page_id)) { |
| 2986 return false; | 2990 return false; |
| 2987 } | 2991 } |
| 2988 | 2992 |
| 2989 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 2993 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 2990 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on | 2994 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on |
| 2991 // linux. See crbug.com/83941. | 2995 // linux. See crbug.com/83941. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3054 | 3058 |
| 3055 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 3059 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { |
| 3056 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 3060 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
| 3057 } | 3061 } |
| 3058 | 3062 |
| 3059 void WebContentsImpl::GetBrowserPluginEmbedderInfo( | 3063 void WebContentsImpl::GetBrowserPluginEmbedderInfo( |
| 3060 content::RenderViewHost* render_view_host, | 3064 content::RenderViewHost* render_view_host, |
| 3061 std::string* embedder_channel_name, | 3065 std::string* embedder_channel_name, |
| 3062 int* embedder_container_id) { | 3066 int* embedder_container_id) { |
| 3063 } | 3067 } |
| OLD | NEW |