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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 #include "content/browser/renderer_host/input/input_router_impl.h" | 44 #include "content/browser/renderer_host/input/input_router_impl.h" |
45 #include "content/browser/renderer_host/input/timeout_monitor.h" | 45 #include "content/browser/renderer_host/input/timeout_monitor.h" |
46 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
47 #include "content/browser/renderer_host/render_view_host_delegate.h" | 47 #include "content/browser/renderer_host/render_view_host_delegate.h" |
48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
49 #include "content/browser/renderer_host/render_view_host_impl.h" | 49 #include "content/browser/renderer_host/render_view_host_impl.h" |
50 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 50 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
51 #include "content/browser/renderer_host/render_widget_host_impl.h" | 51 #include "content/browser/renderer_host/render_widget_host_impl.h" |
52 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 52 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
53 #include "content/browser/wake_lock/wake_lock_service_context.h" | 53 #include "content/browser/wake_lock/wake_lock_service_context.h" |
| 54 #include "content/browser/webshare/share_service_impl.h" |
54 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 55 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
55 #include "content/common/accessibility_messages.h" | 56 #include "content/common/accessibility_messages.h" |
56 #include "content/common/frame_messages.h" | 57 #include "content/common/frame_messages.h" |
57 #include "content/common/input_messages.h" | 58 #include "content/common/input_messages.h" |
58 #include "content/common/inter_process_time_ticks_converter.h" | 59 #include "content/common/inter_process_time_ticks_converter.h" |
59 #include "content/common/navigation_params.h" | 60 #include "content/common/navigation_params.h" |
60 #include "content/common/site_isolation_policy.h" | 61 #include "content/common/site_isolation_policy.h" |
61 #include "content/common/swapped_out_messages.h" | 62 #include "content/common/swapped_out_messages.h" |
62 #include "content/public/browser/ax_event_notification_details.h" | 63 #include "content/public/browser/ax_event_notification_details.h" |
63 #include "content/public/browser/browser_accessibility_state.h" | 64 #include "content/public/browser/browser_accessibility_state.h" |
(...skipping 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2050 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) | 2051 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX) |
2051 enable_web_bluetooth = true; | 2052 enable_web_bluetooth = true; |
2052 #endif | 2053 #endif |
2053 | 2054 |
2054 if (enable_web_bluetooth) { | 2055 if (enable_web_bluetooth) { |
2055 GetInterfaceRegistry()->AddInterface( | 2056 GetInterfaceRegistry()->AddInterface( |
2056 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, | 2057 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, |
2057 base::Unretained(this))); | 2058 base::Unretained(this))); |
2058 } | 2059 } |
2059 | 2060 |
| 2061 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 2062 switches::kEnableExperimentalWebPlatformFeatures)) { |
| 2063 GetInterfaceRegistry()->AddInterface(base::Bind( |
| 2064 &ShareServiceImpl::Create, GetProcess()->GetBrowserContext())); |
| 2065 } |
| 2066 |
2060 if (!frame_mojo_shell_) | 2067 if (!frame_mojo_shell_) |
2061 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 2068 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
2062 | 2069 |
2063 GetInterfaceRegistry()->AddInterface<shell::mojom::Connector>(base::Bind( | 2070 GetInterfaceRegistry()->AddInterface<shell::mojom::Connector>(base::Bind( |
2064 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 2071 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
2065 | 2072 |
2066 #if defined(ENABLE_WEBVR) | 2073 #if defined(ENABLE_WEBVR) |
2067 const base::CommandLine& browser_command_line = | 2074 const base::CommandLine& browser_command_line = |
2068 *base::CommandLine::ForCurrentProcess(); | 2075 *base::CommandLine::ForCurrentProcess(); |
2069 | 2076 |
(...skipping 888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2958 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2965 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2959 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2966 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2960 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2967 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2961 } | 2968 } |
2962 | 2969 |
2963 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2970 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2964 web_bluetooth_service_.reset(); | 2971 web_bluetooth_service_.reset(); |
2965 } | 2972 } |
2966 | 2973 |
2967 } // namespace content | 2974 } // namespace content |
OLD | NEW |