Chromium Code Reviews| 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 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3053 | 3053 |
| 3054 // Now that the RenderView has been created, we need to tell it its size. | 3054 // Now that the RenderView has been created, we need to tell it its size. |
| 3055 if (rwh_view) | 3055 if (rwh_view) |
| 3056 rwh_view->SetSize(view_->GetContainerSize()); | 3056 rwh_view->SetSize(view_->GetContainerSize()); |
| 3057 | 3057 |
| 3058 // Make sure we use the correct starting page_id in the new RenderView. | 3058 // Make sure we use the correct starting page_id in the new RenderView. |
| 3059 UpdateMaxPageIDIfNecessary(render_view_host); | 3059 UpdateMaxPageIDIfNecessary(render_view_host); |
| 3060 int32 max_page_id = | 3060 int32 max_page_id = |
| 3061 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); | 3061 GetMaxPageIDForSiteInstance(render_view_host->GetSiteInstance()); |
| 3062 | 3062 |
| 3063 std::string embedder_channel_name; | 3063 content::NotificationService::current()->Notify( |
| 3064 int embedder_container_id; | 3064 content::NOTIFICATION_WILL_CREATE_RENDER_VIEW, |
| 3065 GetBrowserPluginEmbedderInfo(render_view_host, | 3065 content::Source<WebContents>(this), |
| 3066 &embedder_channel_name, | 3066 content::Details<RenderViewHost>(render_view_host)); |
| 3067 &embedder_container_id); | 3067 |
| 3068 std::string embedder_channel_name; | |
| 3069 int embedder_container_id; | |
| 3070 GetBrowserPluginEmbedderInfo(render_view_host, | |
| 3071 &embedder_channel_name, | |
| 3072 &embedder_container_id); | |
|
scshunt
2012/08/12 01:42:45
The indentation is off, here. And this seems /real
scshunt
2012/08/17 17:30:28
In retrospect, I don't know what I was talking abo
| |
| 3068 if (!static_cast<RenderViewHostImpl*>( | 3073 if (!static_cast<RenderViewHostImpl*>( |
| 3069 render_view_host)->CreateRenderView(string16(), | 3074 render_view_host)->CreateRenderView(string16(), |
| 3070 opener_route_id, | 3075 opener_route_id, |
| 3071 max_page_id, | 3076 max_page_id, |
| 3072 embedder_channel_name, | 3077 embedder_channel_name, |
| 3073 embedder_container_id)) { | 3078 embedder_container_id)) { |
| 3074 return false; | 3079 return false; |
| 3075 } | 3080 } |
| 3076 | 3081 |
| 3077 #if defined(OS_LINUX) || defined(OS_OPENBSD) | 3082 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3152 old_browser_plugin_host()->embedder_render_process_host(); | 3157 old_browser_plugin_host()->embedder_render_process_host(); |
| 3153 *embedder_container_id = old_browser_plugin_host()->instance_id(); | 3158 *embedder_container_id = old_browser_plugin_host()->instance_id(); |
| 3154 int embedder_process_id = | 3159 int embedder_process_id = |
| 3155 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3160 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3156 if (embedder_process_id != -1) { | 3161 if (embedder_process_id != -1) { |
| 3157 *embedder_channel_name = | 3162 *embedder_channel_name = |
| 3158 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3163 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3159 embedder_process_id); | 3164 embedder_process_id); |
| 3160 } | 3165 } |
| 3161 } | 3166 } |
| OLD | NEW |