OLD | NEW |
---|---|
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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
46 #include "content/browser/renderer_host/input/timeout_monitor.h" | 46 #include "content/browser/renderer_host/input/timeout_monitor.h" |
47 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" | 47 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" |
48 #include "content/browser/renderer_host/render_process_host_impl.h" | 48 #include "content/browser/renderer_host/render_process_host_impl.h" |
49 #include "content/browser/renderer_host/render_view_host_delegate.h" | 49 #include "content/browser/renderer_host/render_view_host_delegate.h" |
50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 50 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
51 #include "content/browser/renderer_host/render_view_host_impl.h" | 51 #include "content/browser/renderer_host/render_view_host_impl.h" |
52 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 52 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
53 #include "content/browser/renderer_host/render_widget_host_impl.h" | 53 #include "content/browser/renderer_host/render_widget_host_impl.h" |
54 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 54 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
55 #include "content/browser/shared_worker/shared_worker_service_impl.h" | 55 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
56 #include "content/browser/webshare/share_service_impl.h" | |
56 #include "content/browser/websockets/websocket_manager.h" | 57 #include "content/browser/websockets/websocket_manager.h" |
57 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 58 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
58 #include "content/common/accessibility_messages.h" | 59 #include "content/common/accessibility_messages.h" |
59 #include "content/common/associated_interface_provider_impl.h" | 60 #include "content/common/associated_interface_provider_impl.h" |
60 #include "content/common/associated_interfaces.mojom.h" | 61 #include "content/common/associated_interfaces.mojom.h" |
61 #include "content/common/frame_messages.h" | 62 #include "content/common/frame_messages.h" |
62 #include "content/common/frame_owner_properties.h" | 63 #include "content/common/frame_owner_properties.h" |
63 #include "content/common/input_messages.h" | 64 #include "content/common/input_messages.h" |
64 #include "content/common/inter_process_time_ticks_converter.h" | 65 #include "content/common/inter_process_time_ticks_converter.h" |
65 #include "content/common/navigation_params.h" | 66 #include "content/common/navigation_params.h" |
(...skipping 2247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2313 } | 2314 } |
2314 #endif | 2315 #endif |
2315 | 2316 |
2316 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | 2317 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) |
2317 GetInterfaceRegistry()->AddInterface(base::Bind( | 2318 GetInterfaceRegistry()->AddInterface(base::Bind( |
2318 &RemoterFactoryImpl::Bind, GetProcess()->GetID(), GetRoutingID())); | 2319 &RemoterFactoryImpl::Bind, GetProcess()->GetID(), GetRoutingID())); |
2319 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 2320 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
2320 | 2321 |
2321 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( | 2322 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( |
2322 GetInterfaceRegistry(), this); | 2323 GetInterfaceRegistry(), this); |
2324 | |
2325 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
2326 switches::kEnableExperimentalWebPlatformFeatures)) { | |
Matt Giuca
2016/12/05 02:21:13
You shouldn't check for this switch directly; you
| |
2327 GetInterfaceRegistry()->AddInterface(base::Bind( | |
2328 &ShareServiceImpl::Create)); | |
2329 } | |
2323 } | 2330 } |
2324 | 2331 |
2325 void RenderFrameHostImpl::ResetWaitingState() { | 2332 void RenderFrameHostImpl::ResetWaitingState() { |
2326 DCHECK(is_active()); | 2333 DCHECK(is_active()); |
2327 | 2334 |
2328 // Whenever we reset the RFH state, we should not be waiting for beforeunload | 2335 // Whenever we reset the RFH state, we should not be waiting for beforeunload |
2329 // or close acks. We clear them here to be safe, since they can cause | 2336 // or close acks. We clear them here to be safe, since they can cause |
2330 // navigations to be ignored in OnDidCommitProvisionalLoad. | 2337 // navigations to be ignored in OnDidCommitProvisionalLoad. |
2331 if (is_waiting_for_beforeunload_ack_) { | 2338 if (is_waiting_for_beforeunload_ack_) { |
2332 is_waiting_for_beforeunload_ack_ = false; | 2339 is_waiting_for_beforeunload_ack_ = false; |
(...skipping 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3331 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3338 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3332 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3339 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3333 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3340 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3334 return NavigationHandleImpl::Create( | 3341 return NavigationHandleImpl::Create( |
3335 params.url, frame_tree_node_, is_renderer_initiated, | 3342 params.url, frame_tree_node_, is_renderer_initiated, |
3336 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), | 3343 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), |
3337 entry_id_for_data_nav, false); // started_from_context_menu | 3344 entry_id_for_data_nav, false); // started_from_context_menu |
3338 } | 3345 } |
3339 | 3346 |
3340 } // namespace content | 3347 } // namespace content |
OLD | NEW |