| 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 1860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1871 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, | 1871 base::Bind(&RenderFrameHostImpl::DidUseGeolocationPermission, |
| 1872 weak_ptr_factory_.GetWeakPtr()))); | 1872 weak_ptr_factory_.GetWeakPtr()))); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 WakeLockServiceContext* wake_lock_service_context = | 1875 WakeLockServiceContext* wake_lock_service_context = |
| 1876 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; | 1876 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; |
| 1877 if (wake_lock_service_context) { | 1877 if (wake_lock_service_context) { |
| 1878 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive | 1878 // WakeLockServiceContext is owned by WebContentsImpl so it will outlive |
| 1879 // this RenderFrameHostImpl, hence a raw pointer can be bound to service | 1879 // this RenderFrameHostImpl, hence a raw pointer can be bound to service |
| 1880 // factory callback. | 1880 // factory callback. |
| 1881 GetServiceRegistry()->AddService<mojom::WakeLockService>( | 1881 GetServiceRegistry()->AddService<blink::mojom::WakeLockService>( |
| 1882 base::Bind(&WakeLockServiceContext::CreateService, | 1882 base::Bind(&WakeLockServiceContext::CreateService, |
| 1883 base::Unretained(wake_lock_service_context), | 1883 base::Unretained(wake_lock_service_context), |
| 1884 GetProcess()->GetID(), GetRoutingID())); | 1884 GetProcess()->GetID(), GetRoutingID())); |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 if (!permission_service_context_) | 1887 if (!permission_service_context_) |
| 1888 permission_service_context_.reset(new PermissionServiceContext(this)); | 1888 permission_service_context_.reset(new PermissionServiceContext(this)); |
| 1889 | 1889 |
| 1890 GetServiceRegistry()->AddService( | 1890 GetServiceRegistry()->AddService( |
| 1891 base::Bind(&PermissionServiceContext::CreateService, | 1891 base::Bind(&PermissionServiceContext::CreateService, |
| (...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2741 } | 2741 } |
| 2742 | 2742 |
| 2743 void RenderFrameHostImpl::CreateWebBluetoothService( | 2743 void RenderFrameHostImpl::CreateWebBluetoothService( |
| 2744 blink::mojom::WebBluetoothServiceRequest request) { | 2744 blink::mojom::WebBluetoothServiceRequest request) { |
| 2745 DCHECK(!web_bluetooth_service_); | 2745 DCHECK(!web_bluetooth_service_); |
| 2746 web_bluetooth_service_.reset( | 2746 web_bluetooth_service_.reset( |
| 2747 new WebBluetoothServiceImpl(this, std::move(request))); | 2747 new WebBluetoothServiceImpl(this, std::move(request))); |
| 2748 } | 2748 } |
| 2749 | 2749 |
| 2750 } // namespace content | 2750 } // namespace content |
| OLD | NEW |