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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cmath> | 9 #include <cmath> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 4903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4914 } | 4914 } |
| 4915 | 4915 |
| 4916 bool WebContentsImpl::CreateRenderViewForRenderManager( | 4916 bool WebContentsImpl::CreateRenderViewForRenderManager( |
| 4917 RenderViewHost* render_view_host, | 4917 RenderViewHost* render_view_host, |
| 4918 int opener_frame_routing_id, | 4918 int opener_frame_routing_id, |
| 4919 int proxy_routing_id, | 4919 int proxy_routing_id, |
| 4920 const FrameReplicationState& replicated_frame_state) { | 4920 const FrameReplicationState& replicated_frame_state) { |
| 4921 TRACE_EVENT0("browser,navigation", | 4921 TRACE_EVENT0("browser,navigation", |
| 4922 "WebContentsImpl::CreateRenderViewForRenderManager"); | 4922 "WebContentsImpl::CreateRenderViewForRenderManager"); |
| 4923 | 4923 |
| 4924 if (proxy_routing_id == MSG_ROUTING_NONE) | 4924 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(render_view_host); |
| 4925 | |
| 4926 // We only create a RWHV for active RenderViewHosts. When an inactive RVH is | |
| 4927 // reused, the RWHV is created in RenderFrameHostManager::CommitPending. | |
|
piman
2017/03/28 20:57:55
Belated drive-by...
This seems to be assuming it'
| |
| 4928 if (rvhi->is_active()) { | |
| 4929 DCHECK_EQ(MSG_ROUTING_NONE, proxy_routing_id); | |
| 4925 CreateRenderWidgetHostViewForRenderManager(render_view_host); | 4930 CreateRenderWidgetHostViewForRenderManager(render_view_host); |
| 4931 } | |
| 4926 | 4932 |
| 4927 if (!static_cast<RenderViewHostImpl*>(render_view_host) | 4933 if (!rvhi->CreateRenderView(opener_frame_routing_id, proxy_routing_id, |
| 4928 ->CreateRenderView(opener_frame_routing_id, | 4934 replicated_frame_state, created_with_opener_)) { |
| 4929 proxy_routing_id, | |
| 4930 replicated_frame_state, | |
| 4931 created_with_opener_)) { | |
| 4932 return false; | 4935 return false; |
| 4933 } | 4936 } |
| 4934 | 4937 |
| 4935 SetHistoryOffsetAndLengthForView(render_view_host, | 4938 SetHistoryOffsetAndLengthForView(render_view_host, |
| 4936 controller_.GetLastCommittedEntryIndex(), | 4939 controller_.GetLastCommittedEntryIndex(), |
| 4937 controller_.GetEntryCount()); | 4940 controller_.GetEntryCount()); |
| 4938 | 4941 |
| 4939 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 4942 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 4940 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on | 4943 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on |
| 4941 // linux. See crbug.com/83941. | 4944 // linux. See crbug.com/83941. |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5321 GetMainFrame()->AddMessageToConsole( | 5324 GetMainFrame()->AddMessageToConsole( |
| 5322 content::CONSOLE_MESSAGE_LEVEL_WARNING, | 5325 content::CONSOLE_MESSAGE_LEVEL_WARNING, |
| 5323 base::StringPrintf("This site does not have a valid SSL " | 5326 base::StringPrintf("This site does not have a valid SSL " |
| 5324 "certificate! Without SSL, your site's and " | 5327 "certificate! Without SSL, your site's and " |
| 5325 "visitors' data is vulnerable to theft and " | 5328 "visitors' data is vulnerable to theft and " |
| 5326 "tampering. Get a valid SSL certificate before" | 5329 "tampering. Get a valid SSL certificate before" |
| 5327 " releasing your website to the public.")); | 5330 " releasing your website to the public.")); |
| 5328 } | 5331 } |
| 5329 | 5332 |
| 5330 } // namespace content | 5333 } // namespace content |
| OLD | NEW |