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

Side by Side Diff: content/browser/wake_lock/wake_lock_service_context.cc

Issue 2105653002: Delete content::ServiceRegistry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ew
Patch Set: . Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/wake_lock/wake_lock_service_context.h" 5 #include "content/browser/wake_lock/wake_lock_service_context.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
11 #include "content/public/browser/browser_thread.h" 11 #include "content/public/browser/browser_thread.h"
12 #include "content/public/browser/render_frame_host.h" 12 #include "content/public/browser/render_frame_host.h"
13 #include "content/public/browser/render_process_host.h" 13 #include "content/public/browser/render_process_host.h"
14 #include "content/public/browser/web_contents.h" 14 #include "content/public/browser/web_contents.h"
15 #include "content/public/common/service_registry.h"
16 #include "device/power_save_blocker/power_save_blocker.h" 15 #include "device/power_save_blocker/power_save_blocker.h"
17 16
18 namespace content { 17 namespace content {
19 18
20 WakeLockServiceContext::WakeLockServiceContext(WebContents* web_contents) 19 WakeLockServiceContext::WakeLockServiceContext(WebContents* web_contents)
21 : WebContentsObserver(web_contents), weak_factory_(this) {} 20 : WebContentsObserver(web_contents), weak_factory_(this) {}
22 21
23 WakeLockServiceContext::~WakeLockServiceContext() {} 22 WakeLockServiceContext::~WakeLockServiceContext() {}
24 23
25 void WakeLockServiceContext::CreateService( 24 void WakeLockServiceContext::CreateService(
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 if (!frames_requesting_lock_.empty()) { 93 if (!frames_requesting_lock_.empty()) {
95 if (!wake_lock_) 94 if (!wake_lock_)
96 CreateWakeLock(); 95 CreateWakeLock();
97 } else { 96 } else {
98 if (wake_lock_) 97 if (wake_lock_)
99 RemoveWakeLock(); 98 RemoveWakeLock();
100 } 99 }
101 } 100 }
102 101
103 } // namespace content 102 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_version.cc ('k') | content/common/mojo/service_registry_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698