Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_impl.cc |
| diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc |
| index a25fc594cd3861f74bc23bc863bab09ffe8255a5..6f4c1ff3fc98a2b85c16db6de30feebf6fb317c2 100644 |
| --- a/content/browser/frame_host/render_frame_host_impl.cc |
| +++ b/content/browser/frame_host/render_frame_host_impl.cc |
| @@ -41,6 +41,7 @@ |
| #include "content/browser/renderer_host/render_view_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_impl.h" |
| #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| +#include "content/browser/wake_lock/wake_lock_service_context.h" |
| #include "content/common/accessibility_messages.h" |
| #include "content/common/frame_messages.h" |
| #include "content/common/input_messages.h" |
| @@ -1590,6 +1591,15 @@ void RenderFrameHostImpl::RegisterMojoServices() { |
| base::Unretained(this)))); |
| } |
| + WakeLockServiceContext* wake_lock_service_context = |
| + delegate_ ? delegate_->GetWakeLockServiceContext() : nullptr; |
| + if (wake_lock_service_context) { |
| + GetServiceRegistry()->AddService<WakeLockService>( |
| + base::Bind(&WakeLockServiceContext::CreateService, |
| + base::Unretained(wake_lock_service_context), |
| + base::Unretained(this))); |
|
nasko
2015/09/02 22:40:14
Can you put a comment why using base::Unretained(t
alogvinov
2015/09/03 16:25:00
Done.
|
| + } |
| + |
| if (!permission_service_context_) |
| permission_service_context_.reset(new PermissionServiceContext(this)); |