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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 #include "content/public/browser/render_process_host.h" | 71 #include "content/public/browser/render_process_host.h" |
72 #include "content/public/browser/render_widget_host_view.h" | 72 #include "content/public/browser/render_widget_host_view.h" |
73 #include "content/public/browser/stream_handle.h" | 73 #include "content/public/browser/stream_handle.h" |
74 #include "content/public/browser/user_metrics.h" | 74 #include "content/public/browser/user_metrics.h" |
75 #include "content/public/common/browser_side_navigation_policy.h" | 75 #include "content/public/common/browser_side_navigation_policy.h" |
76 #include "content/public/common/content_constants.h" | 76 #include "content/public/common/content_constants.h" |
77 #include "content/public/common/content_switches.h" | 77 #include "content/public/common/content_switches.h" |
78 #include "content/public/common/isolated_world_ids.h" | 78 #include "content/public/common/isolated_world_ids.h" |
79 #include "content/public/common/url_constants.h" | 79 #include "content/public/common/url_constants.h" |
80 #include "content/public/common/url_utils.h" | 80 #include "content/public/common/url_utils.h" |
81 #include "device/nfc/nfc_impl.h" | |
81 #include "ui/accessibility/ax_tree.h" | 82 #include "ui/accessibility/ax_tree.h" |
82 #include "ui/accessibility/ax_tree_update.h" | 83 #include "ui/accessibility/ax_tree_update.h" |
83 #include "ui/gfx/geometry/quad_f.h" | 84 #include "ui/gfx/geometry/quad_f.h" |
84 #include "url/gurl.h" | 85 #include "url/gurl.h" |
85 | 86 |
86 #if defined(OS_ANDROID) | 87 #if defined(OS_ANDROID) |
87 #include "content/browser/mojo/service_registrar_android.h" | 88 #include "content/browser/mojo/service_registrar_android.h" |
88 #endif | 89 #endif |
89 | 90 |
90 #if defined(OS_MACOSX) | 91 #if defined(OS_MACOSX) |
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1929 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 1930 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
1930 enable_web_bluetooth = true; | 1931 enable_web_bluetooth = true; |
1931 #endif | 1932 #endif |
1932 | 1933 |
1933 if (enable_web_bluetooth) { | 1934 if (enable_web_bluetooth) { |
1934 GetServiceRegistry()->AddService( | 1935 GetServiceRegistry()->AddService( |
1935 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, | 1936 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, |
1936 base::Unretained(this))); | 1937 base::Unretained(this))); |
1937 } | 1938 } |
1938 | 1939 |
1940 GetServiceRegistry()->AddService(base::Bind(&device::NFCImpl::Create)); | |
ncarter (slow)
2016/04/26 22:28:26
Do we plan to implement a c++, non-stub version of
Reilly Grant (use Gerrit)
2016/04/26 22:35:33
Actually, now that I think about it again I'd rath
| |
1941 | |
1939 if (!frame_mojo_shell_) | 1942 if (!frame_mojo_shell_) |
1940 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1943 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
1941 | 1944 |
1942 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( | 1945 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( |
1943 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1946 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
1944 | 1947 |
1945 #if defined(ENABLE_WEBVR) | 1948 #if defined(ENABLE_WEBVR) |
1946 const base::CommandLine& browser_command_line = | 1949 const base::CommandLine& browser_command_line = |
1947 *base::CommandLine::ForCurrentProcess(); | 1950 *base::CommandLine::ForCurrentProcess(); |
1948 | 1951 |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2771 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2774 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2772 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2775 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2773 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2776 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2774 } | 2777 } |
2775 | 2778 |
2776 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2779 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2777 web_bluetooth_service_.reset(); | 2780 web_bluetooth_service_.reset(); |
2778 } | 2781 } |
2779 | 2782 |
2780 } // namespace content | 2783 } // namespace content |
OLD | NEW |