Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1009)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 672263002: Revert "Ensure RenderFrameHostImpl's RenderFrameSetupPtr doesn't die too early" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 22 matching lines...) Expand all
33 #include "content/browser/renderer_host/render_widget_host_impl.h" 33 #include "content/browser/renderer_host/render_widget_host_impl.h"
34 #include "content/browser/renderer_host/render_widget_host_view_base.h" 34 #include "content/browser/renderer_host/render_widget_host_view_base.h"
35 #include "content/browser/transition_request_manager.h" 35 #include "content/browser/transition_request_manager.h"
36 #include "content/common/accessibility_messages.h" 36 #include "content/common/accessibility_messages.h"
37 #include "content/common/desktop_notification_messages.h" 37 #include "content/common/desktop_notification_messages.h"
38 #include "content/common/frame_messages.h" 38 #include "content/common/frame_messages.h"
39 #include "content/common/input_messages.h" 39 #include "content/common/input_messages.h"
40 #include "content/common/inter_process_time_ticks_converter.h" 40 #include "content/common/inter_process_time_ticks_converter.h"
41 #include "content/common/navigation_params.h" 41 #include "content/common/navigation_params.h"
42 #include "content/common/platform_notification_messages.h" 42 #include "content/common/platform_notification_messages.h"
43 #include "content/common/render_frame_setup.mojom.h"
43 #include "content/common/swapped_out_messages.h" 44 #include "content/common/swapped_out_messages.h"
44 #include "content/public/browser/ax_event_notification_details.h" 45 #include "content/public/browser/ax_event_notification_details.h"
45 #include "content/public/browser/browser_accessibility_state.h" 46 #include "content/public/browser/browser_accessibility_state.h"
46 #include "content/public/browser/browser_context.h" 47 #include "content/public/browser/browser_context.h"
47 #include "content/public/browser/browser_plugin_guest_manager.h" 48 #include "content/public/browser/browser_plugin_guest_manager.h"
48 #include "content/public/browser/browser_thread.h" 49 #include "content/public/browser/browser_thread.h"
49 #include "content/public/browser/content_browser_client.h" 50 #include "content/public/browser/content_browser_client.h"
50 #include "content/public/browser/desktop_notification_delegate.h" 51 #include "content/public/browser/desktop_notification_delegate.h"
51 #include "content/public/browser/render_process_host.h" 52 #include "content/public/browser/render_process_host.h"
52 #include "content/public/browser/render_widget_host_view.h" 53 #include "content/public/browser/render_widget_host_view.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 this)); 197 this));
197 198
198 if (is_swapped_out) { 199 if (is_swapped_out) {
199 rfh_state_ = STATE_SWAPPED_OUT; 200 rfh_state_ = STATE_SWAPPED_OUT;
200 } else { 201 } else {
201 rfh_state_ = STATE_DEFAULT; 202 rfh_state_ = STATE_DEFAULT;
202 GetSiteInstance()->increment_active_frame_count(); 203 GetSiteInstance()->increment_active_frame_count();
203 } 204 }
204 205
205 if (GetProcess()->GetServiceRegistry()) { 206 if (GetProcess()->GetServiceRegistry()) {
206 GetProcess()->GetServiceRegistry()->ConnectToRemoteService( 207 RenderFrameSetupPtr setup;
207 &render_frame_setup_); 208 GetProcess()->GetServiceRegistry()->ConnectToRemoteService(&setup);
208 mojo::ServiceProviderPtr service_provider; 209 mojo::ServiceProviderPtr service_provider;
209 render_frame_setup_->GetServiceProviderForFrame( 210 setup->GetServiceProviderForFrame(routing_id_,
210 routing_id_, mojo::GetProxy(&service_provider)); 211 mojo::GetProxy(&service_provider));
211 service_registry_.BindRemoteServiceProvider( 212 service_registry_.BindRemoteServiceProvider(
212 service_provider.PassMessagePipe()); 213 service_provider.PassMessagePipe());
213 214
214 #if defined(OS_ANDROID) 215 #if defined(OS_ANDROID)
215 service_registry_android_.reset( 216 service_registry_android_.reset(
216 new ServiceRegistryAndroid(&service_registry_)); 217 new ServiceRegistryAndroid(&service_registry_));
217 #endif 218 #endif
218 } 219 }
219 220
220 swapout_event_monitor_timeout_.reset(new TimeoutMonitor(base::Bind( 221 swapout_event_monitor_timeout_.reset(new TimeoutMonitor(base::Bind(
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1563 // Clear any state if a pending navigation is canceled or preempted. 1564 // Clear any state if a pending navigation is canceled or preempted.
1564 if (suspended_nav_params_) 1565 if (suspended_nav_params_)
1565 suspended_nav_params_.reset(); 1566 suspended_nav_params_.reset();
1566 1567
1567 TRACE_EVENT_ASYNC_END0("navigation", 1568 TRACE_EVENT_ASYNC_END0("navigation",
1568 "RenderFrameHostImpl navigation suspended", this); 1569 "RenderFrameHostImpl navigation suspended", this);
1569 navigations_suspended_ = false; 1570 navigations_suspended_ = false;
1570 } 1571 }
1571 1572
1572 } // namespace content 1573 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698