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

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

Issue 2080553002: bluetooth: Enable Web Bluetooth in Origin Trials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: Change to MacOS Created 4 years, 6 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 | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 GetInterfaceRegistry()->AddInterface(base::Bind( 2040 GetInterfaceRegistry()->AddInterface(base::Bind(
2041 &PresentationServiceImpl::CreateMojoService, base::Unretained(this))); 2041 &PresentationServiceImpl::CreateMojoService, base::Unretained(this)));
2042 2042
2043 #if !defined(OS_ANDROID) 2043 #if !defined(OS_ANDROID)
2044 GetInterfaceRegistry()->AddInterface( 2044 GetInterfaceRegistry()->AddInterface(
2045 base::Bind(&device::VibrationManagerImpl::Create)); 2045 base::Bind(&device::VibrationManagerImpl::Create));
2046 #endif 2046 #endif
2047 2047
2048 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch( 2048 bool enable_web_bluetooth = base::CommandLine::ForCurrentProcess()->HasSwitch(
2049 switches::kEnableWebBluetooth); 2049 switches::kEnableWebBluetooth);
2050 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 2050 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_MACOSX)
2051 enable_web_bluetooth = true; 2051 enable_web_bluetooth = true;
2052 #endif 2052 #endif
2053 2053
2054 if (enable_web_bluetooth) { 2054 if (enable_web_bluetooth) {
2055 GetInterfaceRegistry()->AddInterface( 2055 GetInterfaceRegistry()->AddInterface(
2056 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, 2056 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService,
2057 base::Unretained(this))); 2057 base::Unretained(this)));
2058 } 2058 }
2059 2059
2060 if (!frame_mojo_shell_) 2060 if (!frame_mojo_shell_)
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2960 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2960 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2961 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2961 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2962 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2962 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2963 } 2963 }
2964 2964
2965 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2965 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2966 web_bluetooth_service_.reset(); 2966 web_bluetooth_service_.reset();
2967 } 2967 }
2968 2968
2969 } // namespace content 2969 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698