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