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

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

Issue 1486043002: [webnfc] Implement push method for Android nfc mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@step_6_add_mojo_service_CL
Patch Set: Rebased. Created 4 years, 7 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 | content/content.gyp » ('j') | device/nfc/android/BUILD.gn » ('J')
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 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) 1930 #if defined(OS_CHROMEOS) || defined(OS_ANDROID)
1931 enable_web_bluetooth = true; 1931 enable_web_bluetooth = true;
1932 #endif 1932 #endif
1933 1933
1934 if (enable_web_bluetooth) { 1934 if (enable_web_bluetooth) {
1935 GetServiceRegistry()->AddService( 1935 GetServiceRegistry()->AddService(
1936 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, 1936 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService,
1937 base::Unretained(this))); 1937 base::Unretained(this)));
1938 } 1938 }
1939 1939
1940 #if !defined(OS_ANDROID)
ncarter (slow) 2016/04/25 20:03:14 Please add a comment: // On android, NFC is impl
shalamov 2016/04/26 21:56:52 Done.
1940 GetServiceRegistry()->AddService<device::NFC>( 1941 GetServiceRegistry()->AddService<device::NFC>(
1941 base::Bind(&device::NFCImpl::Create)); 1942 base::Bind(&device::NFCImpl::Create));
ncarter (slow) 2016/04/25 20:03:14 This line doesn't seem to exist at tip of tree; I
shalamov 2016/04/26 21:56:52 Yes, I'm planning to land https://crrev.com/191236
1943 #endif
1942 1944
1943 if (!frame_mojo_shell_) 1945 if (!frame_mojo_shell_)
1944 frame_mojo_shell_.reset(new FrameMojoShell(this)); 1946 frame_mojo_shell_.reset(new FrameMojoShell(this));
1945 1947
1946 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( 1948 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind(
1947 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); 1949 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get())));
1948 1950
1949 #if defined(ENABLE_WEBVR) 1951 #if defined(ENABLE_WEBVR)
1950 const base::CommandLine& browser_command_line = 1952 const base::CommandLine& browser_command_line =
1951 *base::CommandLine::ForCurrentProcess(); 1953 *base::CommandLine::ForCurrentProcess();
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
2775 // handler after it's destroyed so it can't run after the RFHI is destroyed. 2777 // handler after it's destroyed so it can't run after the RFHI is destroyed.
2776 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( 2778 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind(
2777 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); 2779 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this)));
2778 } 2780 }
2779 2781
2780 void RenderFrameHostImpl::DeleteWebBluetoothService() { 2782 void RenderFrameHostImpl::DeleteWebBluetoothService() {
2781 web_bluetooth_service_.reset(); 2783 web_bluetooth_service_.reset();
2782 } 2784 }
2783 2785
2784 } // namespace content 2786 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/content.gyp » ('j') | device/nfc/android/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698