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

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

Issue 2545323002: Implemented stub ShareService mojo service, for navigator.share. (Closed)
Patch Set: Nits Created 4 years 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/DEPS ('k') | content/browser/webshare/OWNERS » ('j') | 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 <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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "content/browser/renderer_host/input/timeout_monitor.h" 47 #include "content/browser/renderer_host/input/timeout_monitor.h"
48 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h" 48 #include "content/browser/renderer_host/media/media_devices_dispatcher_host.h"
49 #include "content/browser/renderer_host/render_process_host_impl.h" 49 #include "content/browser/renderer_host/render_process_host_impl.h"
50 #include "content/browser/renderer_host/render_view_host_delegate.h" 50 #include "content/browser/renderer_host/render_view_host_delegate.h"
51 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 51 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
52 #include "content/browser/renderer_host/render_view_host_impl.h" 52 #include "content/browser/renderer_host/render_view_host_impl.h"
53 #include "content/browser/renderer_host/render_widget_host_delegate.h" 53 #include "content/browser/renderer_host/render_widget_host_delegate.h"
54 #include "content/browser/renderer_host/render_widget_host_impl.h" 54 #include "content/browser/renderer_host/render_widget_host_impl.h"
55 #include "content/browser/renderer_host/render_widget_host_view_base.h" 55 #include "content/browser/renderer_host/render_widget_host_view_base.h"
56 #include "content/browser/shared_worker/shared_worker_service_impl.h" 56 #include "content/browser/shared_worker/shared_worker_service_impl.h"
57 #include "content/browser/webshare/share_service_impl.h"
57 #include "content/browser/websockets/websocket_manager.h" 58 #include "content/browser/websockets/websocket_manager.h"
58 #include "content/browser/webui/web_ui_controller_factory_registry.h" 59 #include "content/browser/webui/web_ui_controller_factory_registry.h"
59 #include "content/common/accessibility_messages.h" 60 #include "content/common/accessibility_messages.h"
60 #include "content/common/associated_interface_provider_impl.h" 61 #include "content/common/associated_interface_provider_impl.h"
61 #include "content/common/associated_interfaces.mojom.h" 62 #include "content/common/associated_interfaces.mojom.h"
62 #include "content/common/frame_messages.h" 63 #include "content/common/frame_messages.h"
63 #include "content/common/frame_owner_properties.h" 64 #include "content/common/frame_owner_properties.h"
64 #include "content/common/input_messages.h" 65 #include "content/common/input_messages.h"
65 #include "content/common/inter_process_time_ticks_converter.h" 66 #include "content/common/inter_process_time_ticks_converter.h"
66 #include "content/common/navigation_params.h" 67 #include "content/common/navigation_params.h"
67 #include "content/common/renderer.mojom.h" 68 #include "content/common/renderer.mojom.h"
68 #include "content/common/site_isolation_policy.h" 69 #include "content/common/site_isolation_policy.h"
69 #include "content/common/swapped_out_messages.h" 70 #include "content/common/swapped_out_messages.h"
70 #include "content/public/browser/ax_event_notification_details.h" 71 #include "content/public/browser/ax_event_notification_details.h"
71 #include "content/public/browser/browser_accessibility_state.h" 72 #include "content/public/browser/browser_accessibility_state.h"
72 #include "content/public/browser/browser_context.h" 73 #include "content/public/browser/browser_context.h"
73 #include "content/public/browser/browser_plugin_guest_manager.h" 74 #include "content/public/browser/browser_plugin_guest_manager.h"
74 #include "content/public/browser/browser_thread.h" 75 #include "content/public/browser/browser_thread.h"
75 #include "content/public/browser/content_browser_client.h" 76 #include "content/public/browser/content_browser_client.h"
76 #include "content/public/browser/permission_manager.h" 77 #include "content/public/browser/permission_manager.h"
77 #include "content/public/browser/permission_type.h" 78 #include "content/public/browser/permission_type.h"
78 #include "content/public/browser/render_process_host.h" 79 #include "content/public/browser/render_process_host.h"
79 #include "content/public/browser/render_widget_host_view.h" 80 #include "content/public/browser/render_widget_host_view.h"
80 #include "content/public/browser/resource_context.h" 81 #include "content/public/browser/resource_context.h"
81 #include "content/public/browser/storage_partition.h" 82 #include "content/public/browser/storage_partition.h"
82 #include "content/public/browser/stream_handle.h" 83 #include "content/public/browser/stream_handle.h"
83 #include "content/public/browser/user_metrics.h" 84 #include "content/public/browser/user_metrics.h"
84 #include "content/public/common/browser_side_navigation_policy.h" 85 #include "content/public/common/browser_side_navigation_policy.h"
86 #include "content/public/common/content_client.h"
85 #include "content/public/common/content_constants.h" 87 #include "content/public/common/content_constants.h"
86 #include "content/public/common/content_features.h" 88 #include "content/public/common/content_features.h"
87 #include "content/public/common/content_switches.h" 89 #include "content/public/common/content_switches.h"
88 #include "content/public/common/file_chooser_file_info.h" 90 #include "content/public/common/file_chooser_file_info.h"
89 #include "content/public/common/file_chooser_params.h" 91 #include "content/public/common/file_chooser_params.h"
90 #include "content/public/common/form_field_data.h" 92 #include "content/public/common/form_field_data.h"
91 #include "content/public/common/isolated_world_ids.h" 93 #include "content/public/common/isolated_world_ids.h"
94 #include "content/public/common/origin_trial_policy.h"
92 #include "content/public/common/service_manager_connection.h" 95 #include "content/public/common/service_manager_connection.h"
93 #include "content/public/common/service_names.mojom.h" 96 #include "content/public/common/service_names.mojom.h"
94 #include "content/public/common/url_constants.h" 97 #include "content/public/common/url_constants.h"
95 #include "content/public/common/url_utils.h" 98 #include "content/public/common/url_utils.h"
96 #include "device/generic_sensor/sensor_provider_impl.h" 99 #include "device/generic_sensor/sensor_provider_impl.h"
97 #include "device/geolocation/geolocation_service_context.h" 100 #include "device/geolocation/geolocation_service_context.h"
98 #include "device/vibration/vibration_manager_impl.h" 101 #include "device/vibration/vibration_manager_impl.h"
99 #include "device/wake_lock/wake_lock_service_context.h" 102 #include "device/wake_lock/wake_lock_service_context.h"
100 #include "media/base/media_switches.h" 103 #include "media/base/media_switches.h"
101 #include "media/media_features.h" 104 #include "media/media_features.h"
(...skipping 2184 matching lines...) Expand 10 before | Expand all | Expand 10 after
2286 } 2289 }
2287 #endif 2290 #endif
2288 2291
2289 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) 2292 #if BUILDFLAG(ENABLE_MEDIA_REMOTING)
2290 GetInterfaceRegistry()->AddInterface(base::Bind( 2293 GetInterfaceRegistry()->AddInterface(base::Bind(
2291 &RemoterFactoryImpl::Bind, GetProcess()->GetID(), GetRoutingID())); 2294 &RemoterFactoryImpl::Bind, GetProcess()->GetID(), GetRoutingID()));
2292 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 2295 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
2293 2296
2294 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( 2297 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces(
2295 GetInterfaceRegistry(), this); 2298 GetInterfaceRegistry(), this);
2299
2300 #if defined(OS_LINUX) || defined(OS_WIN)
2301 OriginTrialPolicy* otp = GetContentClient()->GetOriginTrialPolicy();
Matt Giuca 2016/12/13 06:06:08 nit: You could call this |policy| instead of |otp|
constantina 2016/12/13 06:09:55 Done.
2302 if (!otp || !otp->IsFeatureDisabled("WebShare")) {
2303 GetInterfaceRegistry()->AddInterface(base::Bind(&ShareServiceImpl::Create));
2304 }
2305 #endif
2296 } 2306 }
2297 2307
2298 void RenderFrameHostImpl::ResetWaitingState() { 2308 void RenderFrameHostImpl::ResetWaitingState() {
2299 DCHECK(is_active()); 2309 DCHECK(is_active());
2300 2310
2301 // Whenever we reset the RFH state, we should not be waiting for beforeunload 2311 // Whenever we reset the RFH state, we should not be waiting for beforeunload
2302 // or close acks. We clear them here to be safe, since they can cause 2312 // or close acks. We clear them here to be safe, since they can cause
2303 // navigations to be ignored in OnDidCommitProvisionalLoad. 2313 // navigations to be ignored in OnDidCommitProvisionalLoad.
2304 if (is_waiting_for_beforeunload_ack_) { 2314 if (is_waiting_for_beforeunload_ack_) {
2305 is_waiting_for_beforeunload_ack_ = false; 2315 is_waiting_for_beforeunload_ack_ = false;
(...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after
3322 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3332 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3323 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3333 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3324 return NavigationHandleImpl::Create( 3334 return NavigationHandleImpl::Create(
3325 params.url, frame_tree_node_, is_renderer_initiated, 3335 params.url, frame_tree_node_, is_renderer_initiated,
3326 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(), 3336 params.was_within_same_page, params.is_srcdoc, base::TimeTicks::Now(),
3327 entry_id_for_data_nav, params.gesture, 3337 entry_id_for_data_nav, params.gesture,
3328 false); // started_from_context_menu 3338 false); // started_from_context_menu
3329 } 3339 }
3330 3340
3331 } // namespace content 3341 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/DEPS ('k') | content/browser/webshare/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698