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 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1927 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 1928 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
1928 enable_web_bluetooth = true; | 1929 enable_web_bluetooth = true; |
1929 #endif | 1930 #endif |
1930 | 1931 |
1931 if (enable_web_bluetooth) { | 1932 if (enable_web_bluetooth) { |
1932 GetServiceRegistry()->AddService( | 1933 GetServiceRegistry()->AddService( |
1933 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, | 1934 base::Bind(&RenderFrameHostImpl::CreateWebBluetoothService, |
1934 base::Unretained(this))); | 1935 base::Unretained(this))); |
1935 } | 1936 } |
1936 | 1937 |
1938 GetServiceRegistry()->AddService<device::NFC>( | |
Reilly Grant (use Gerrit)
2016/04/25 21:48:35
The template parameter shouldn't be necessary here
shalamov
2016/04/26 10:17:32
Done.
| |
1939 base::Bind(&device::NFCImpl::Create)); | |
1940 | |
1937 if (!frame_mojo_shell_) | 1941 if (!frame_mojo_shell_) |
1938 frame_mojo_shell_.reset(new FrameMojoShell(this)); | 1942 frame_mojo_shell_.reset(new FrameMojoShell(this)); |
1939 | 1943 |
1940 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( | 1944 GetServiceRegistry()->AddService<shell::mojom::Connector>(base::Bind( |
1941 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); | 1945 &FrameMojoShell::BindRequest, base::Unretained(frame_mojo_shell_.get()))); |
1942 | 1946 |
1943 #if defined(ENABLE_WEBVR) | 1947 #if defined(ENABLE_WEBVR) |
1944 const base::CommandLine& browser_command_line = | 1948 const base::CommandLine& browser_command_line = |
1945 *base::CommandLine::ForCurrentProcess(); | 1949 *base::CommandLine::ForCurrentProcess(); |
1946 | 1950 |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2769 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2773 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2770 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2774 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2771 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2775 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2772 } | 2776 } |
2773 | 2777 |
2774 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2778 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2775 web_bluetooth_service_.reset(); | 2779 web_bluetooth_service_.reset(); |
2776 } | 2780 } |
2777 | 2781 |
2778 } // namespace content | 2782 } // namespace content |
OLD | NEW |