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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 #include "content/browser/mojo/service_registrar_android.h" | 92 #include "content/browser/mojo/service_registrar_android.h" |
93 #endif | 93 #endif |
94 | 94 |
95 #if defined(OS_MACOSX) | 95 #if defined(OS_MACOSX) |
96 #include "content/browser/frame_host/popup_menu_helper_mac.h" | 96 #include "content/browser/frame_host/popup_menu_helper_mac.h" |
97 #endif | 97 #endif |
98 | 98 |
99 #if defined(ENABLE_WEBVR) | 99 #if defined(ENABLE_WEBVR) |
100 #include "base/command_line.h" | 100 #include "base/command_line.h" |
101 #include "content/public/common/content_switches.h" | 101 #include "content/public/common/content_switches.h" |
102 #include "device/vr/vr_device_manager.h" // nogncheck | 102 #include "device/vr/vr_service_impl.h" // nogncheck |
103 #endif | 103 #endif |
104 | 104 |
105 using base::TimeDelta; | 105 using base::TimeDelta; |
106 | 106 |
107 namespace content { | 107 namespace content { |
108 | 108 |
109 namespace { | 109 namespace { |
110 | 110 |
111 // The next value to use for the accessibility reset token. | 111 // The next value to use for the accessibility reset token. |
112 int g_next_accessibility_reset_token = 1; | 112 int g_next_accessibility_reset_token = 1; |
(...skipping 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2064 | 2064 |
2065 GetInterfaceRegistry()->AddInterface<shell::mojom::Connector>(base::Bind( | 2065 GetInterfaceRegistry()->AddInterface<shell::mojom::Connector>(base::Bind( |
2066 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 2066 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
2067 | 2067 |
2068 #if defined(ENABLE_WEBVR) | 2068 #if defined(ENABLE_WEBVR) |
2069 const base::CommandLine& browser_command_line = | 2069 const base::CommandLine& browser_command_line = |
2070 *base::CommandLine::ForCurrentProcess(); | 2070 *base::CommandLine::ForCurrentProcess(); |
2071 | 2071 |
2072 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { | 2072 if (browser_command_line.HasSwitch(switches::kEnableWebVR)) { |
2073 GetInterfaceRegistry()->AddInterface<device::VRService>( | 2073 GetInterfaceRegistry()->AddInterface<device::VRService>( |
2074 base::Bind(&device::VRDeviceManager::BindRequest)); | 2074 base::Bind(&device::VRServiceImpl::BindRequest)); |
2075 } | 2075 } |
2076 #endif | 2076 #endif |
2077 | 2077 |
2078 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( | 2078 GetContentClient()->browser()->RegisterRenderFrameMojoInterfaces( |
2079 GetInterfaceRegistry(), this); | 2079 GetInterfaceRegistry(), this); |
2080 } | 2080 } |
2081 | 2081 |
2082 void RenderFrameHostImpl::ResetWaitingState() { | 2082 void RenderFrameHostImpl::ResetWaitingState() { |
2083 DCHECK(is_active()); | 2083 DCHECK(is_active()); |
2084 | 2084 |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2970 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2970 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2971 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2971 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2972 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2972 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2973 } | 2973 } |
2974 | 2974 |
2975 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2975 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2976 web_bluetooth_service_.reset(); | 2976 web_bluetooth_service_.reset(); |
2977 } | 2977 } |
2978 | 2978 |
2979 } // namespace content | 2979 } // namespace content |
OLD | NEW |