| 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 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2312 } | 2312 } |
| 2313 | 2313 |
| 2314 void WebContentsImpl::RenderViewCreated(RenderViewHost* render_view_host) { | 2314 void WebContentsImpl::RenderViewCreated(RenderViewHost* render_view_host) { |
| 2315 // Don't send notifications if we are just creating a swapped-out RVH for | 2315 // Don't send notifications if we are just creating a swapped-out RVH for |
| 2316 // the opener chain. These won't be used for view-source or WebUI, so it's | 2316 // the opener chain. These won't be used for view-source or WebUI, so it's |
| 2317 // ok to return early. | 2317 // ok to return early. |
| 2318 if (static_cast<RenderViewHostImpl*>(render_view_host)->is_swapped_out()) | 2318 if (static_cast<RenderViewHostImpl*>(render_view_host)->is_swapped_out()) |
| 2319 return; | 2319 return; |
| 2320 | 2320 |
| 2321 content::NotificationService::current()->Notify( | 2321 content::NotificationService::current()->Notify( |
| 2322 content::NOTIFICATION_RENDER_VIEW_HOST_CREATED_FOR_TAB, | 2322 content::NOTIFICATION_WEB_CONTENTS_RENDER_VIEW_HOST_CREATED, |
| 2323 content::Source<WebContents>(this), | 2323 content::Source<WebContents>(this), |
| 2324 content::Details<RenderViewHost>(render_view_host)); | 2324 content::Details<RenderViewHost>(render_view_host)); |
| 2325 NavigationEntry* entry = controller_.GetActiveEntry(); | 2325 NavigationEntry* entry = controller_.GetActiveEntry(); |
| 2326 if (!entry) | 2326 if (!entry) |
| 2327 return; | 2327 return; |
| 2328 | 2328 |
| 2329 // When we're creating views, we're still doing initial setup, so we always | 2329 // When we're creating views, we're still doing initial setup, so we always |
| 2330 // use the pending Web UI rather than any possibly existing committed one. | 2330 // use the pending Web UI rather than any possibly existing committed one. |
| 2331 if (render_manager_.pending_web_ui()) | 2331 if (render_manager_.pending_web_ui()) |
| 2332 render_manager_.pending_web_ui()->RenderViewCreated(render_view_host); | 2332 render_manager_.pending_web_ui()->RenderViewCreated(render_view_host); |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3074 browser_plugin_host()->embedder_render_process_host(); | 3074 browser_plugin_host()->embedder_render_process_host(); |
| 3075 *embedder_container_id = browser_plugin_host()->instance_id(); | 3075 *embedder_container_id = browser_plugin_host()->instance_id(); |
| 3076 int embedder_process_id = | 3076 int embedder_process_id = |
| 3077 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; | 3077 embedder_render_process_host ? embedder_render_process_host->GetID() : -1; |
| 3078 if (embedder_process_id != -1) { | 3078 if (embedder_process_id != -1) { |
| 3079 *embedder_channel_name = | 3079 *embedder_channel_name = |
| 3080 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), | 3080 StringPrintf("%d.r%d", render_view_host->GetProcess()->GetID(), |
| 3081 embedder_process_id); | 3081 embedder_process_id); |
| 3082 } | 3082 } |
| 3083 } | 3083 } |
| OLD | NEW |