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

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

Issue 2843353003: Move ownership of PowerSaveBlocker from WakeLockServiceContext to WakeLockServiceImpl (Closed)
Patch Set: code rebase Created 3 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
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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 3713 matching lines...) Expand 10 before | Expand all | Expand 10 after
3724 } 3724 }
3725 3725
3726 void RenderFrameHostImpl::OnMediaInterfaceFactoryConnectionError() { 3726 void RenderFrameHostImpl::OnMediaInterfaceFactoryConnectionError() {
3727 DCHECK(media_interface_proxy_); 3727 DCHECK(media_interface_proxy_);
3728 media_interface_proxy_.reset(); 3728 media_interface_proxy_.reset();
3729 } 3729 }
3730 3730
3731 void RenderFrameHostImpl::BindWakeLockServiceRequest( 3731 void RenderFrameHostImpl::BindWakeLockServiceRequest(
3732 const service_manager::BindSourceInfo& source_info, 3732 const service_manager::BindSourceInfo& source_info,
3733 device::mojom::WakeLockServiceRequest request) { 3733 device::mojom::WakeLockServiceRequest request) {
3734 device::mojom::WakeLockContext* wake_lock_service_context = 3734 device::mojom::WakeLockService* renderer_wake_lock =
3735 delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; 3735 delegate_ ? delegate_->GetRendererWakeLock() : nullptr;
3736 if (wake_lock_service_context) 3736 if (renderer_wake_lock)
3737 wake_lock_service_context->GetWakeLock(std::move(request)); 3737 renderer_wake_lock->AddClient(std::move(request));
3738 } 3738 }
3739 3739
3740 void RenderFrameHostImpl::GetInterface( 3740 void RenderFrameHostImpl::GetInterface(
3741 const std::string& interface_name, 3741 const std::string& interface_name,
3742 mojo::ScopedMessagePipeHandle interface_pipe) { 3742 mojo::ScopedMessagePipeHandle interface_pipe) {
3743 if (interface_registry_.get()) { 3743 if (interface_registry_.get()) {
3744 service_manager::BindSourceInfo source_info( 3744 service_manager::BindSourceInfo source_info(
3745 GetProcess()->GetChildIdentity(), service_manager::CapabilitySet()); 3745 GetProcess()->GetChildIdentity(), service_manager::CapabilitySet());
3746 interface_registry_->BindInterface(source_info, interface_name, 3746 interface_registry_->BindInterface(source_info, interface_name,
3747 std::move(interface_pipe)); 3747 std::move(interface_pipe));
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
3911 } 3911 }
3912 3912
3913 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( 3913 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame(
3914 const std::string& interface_name, 3914 const std::string& interface_name,
3915 mojo::ScopedMessagePipeHandle pipe) { 3915 mojo::ScopedMessagePipeHandle pipe) {
3916 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); 3916 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe));
3917 } 3917 }
3918 #endif 3918 #endif
3919 3919
3920 } // namespace content 3920 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698