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 4840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4851 } | 4851 } |
| 4852 | 4852 |
| 4853 bool WebContentsImpl::CreateRenderViewForRenderManager( | 4853 bool WebContentsImpl::CreateRenderViewForRenderManager( |
| 4854 RenderViewHost* render_view_host, | 4854 RenderViewHost* render_view_host, |
| 4855 int opener_frame_routing_id, | 4855 int opener_frame_routing_id, |
| 4856 int proxy_routing_id, | 4856 int proxy_routing_id, |
| 4857 const FrameReplicationState& replicated_frame_state) { | 4857 const FrameReplicationState& replicated_frame_state) { |
| 4858 TRACE_EVENT0("browser,navigation", | 4858 TRACE_EVENT0("browser,navigation", |
| 4859 "WebContentsImpl::CreateRenderViewForRenderManager"); | 4859 "WebContentsImpl::CreateRenderViewForRenderManager"); |
| 4860 | 4860 |
| 4861 if (proxy_routing_id == MSG_ROUTING_NONE) | 4861 RenderViewHostImpl* rvhi = static_cast<RenderViewHostImpl*>(render_view_host); |
| 4862 | |
| 4863 if (!rvhi->is_swapped_out()) | |
|
lfg
2016/11/15 04:37:34
This is also a no-op, but it makes it easier to un
Charlie Reis
2016/11/15 19:59:05
When you say no-op, you mean is_swapped_out() and
alexmos
2016/11/17 17:55:57
See my earlier comment about moving the GetView()
lfg
2016/11/23 00:27:05
Added the DCHECK and switched to is_active.
| |
| 4862 CreateRenderWidgetHostViewForRenderManager(render_view_host); | 4864 CreateRenderWidgetHostViewForRenderManager(render_view_host); |
| 4863 | 4865 |
| 4864 if (!static_cast<RenderViewHostImpl*>(render_view_host) | 4866 if (!rvhi->CreateRenderView(opener_frame_routing_id, proxy_routing_id, |
| 4865 ->CreateRenderView(opener_frame_routing_id, | 4867 replicated_frame_state, created_with_opener_)) { |
| 4866 proxy_routing_id, | |
| 4867 replicated_frame_state, | |
| 4868 created_with_opener_)) { | |
| 4869 return false; | 4868 return false; |
| 4870 } | 4869 } |
| 4871 | 4870 |
| 4872 SetHistoryOffsetAndLengthForView(render_view_host, | 4871 SetHistoryOffsetAndLengthForView(render_view_host, |
| 4873 controller_.GetLastCommittedEntryIndex(), | 4872 controller_.GetLastCommittedEntryIndex(), |
| 4874 controller_.GetEntryCount()); | 4873 controller_.GetEntryCount()); |
| 4875 | 4874 |
| 4876 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) | 4875 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 4877 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on | 4876 // Force a ViewMsg_Resize to be sent, needed to make plugins show up on |
| 4878 // linux. See crbug.com/83941. | 4877 // linux. See crbug.com/83941. |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5214 dialog_manager_ = dialog_manager; | 5213 dialog_manager_ = dialog_manager; |
| 5215 } | 5214 } |
| 5216 | 5215 |
| 5217 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5216 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5218 auto it = binding_sets_.find(interface_name); | 5217 auto it = binding_sets_.find(interface_name); |
| 5219 if (it != binding_sets_.end()) | 5218 if (it != binding_sets_.end()) |
| 5220 binding_sets_.erase(it); | 5219 binding_sets_.erase(it); |
| 5221 } | 5220 } |
| 5222 | 5221 |
| 5223 } // namespace content | 5222 } // namespace content |
| OLD | NEW |