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

Unified Diff: content/browser/power_save_blocker_impl.h

Issue 2003803002: Remove dependency of power_save_blocker_android on various content bits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@power-save-task-runners
Patch Set: only .reset() Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/power_save_blocker_impl.h
diff --git a/content/browser/power_save_blocker_impl.h b/content/browser/power_save_blocker_impl.h
index 93d90ebe756fc275d6174c3634c17e8789b3c6b4..dcc9e62ff8b0aeff09b581ffee1b6017c151c38d 100644
--- a/content/browser/power_save_blocker_impl.h
+++ b/content/browser/power_save_blocker_impl.h
@@ -9,11 +9,16 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
#include "base/single_thread_task_runner.h"
#include "build/build_config.h"
#include "content/public/browser/power_save_blocker.h"
+#if defined(OS_ANDROID)
+#include "ui/android/view_android.h"
+#endif // OS_ANDROID
+
namespace content {
class WebContents;
@@ -29,10 +34,11 @@ class PowerSaveBlockerImpl : public PowerSaveBlocker {
~PowerSaveBlockerImpl() override;
#if defined(OS_ANDROID)
- // In Android platform, the kPowerSaveBlockPreventDisplaySleep type of
- // PowerSaveBlocker should associated with a WebContents, so the blocker
- // could be removed by platform if the WebContents is hidden.
- void InitDisplaySleepBlocker(WebContents* web_contents);
+ // On Android, the kPowerSaveBlockPreventDisplaySleep type of
+ // PowerSaveBlocker should associated with a View, so the blocker can be
+ // removed by the platform.
+ void InitDisplaySleepBlocker(
+ const base::WeakPtr<ui::ViewAndroid>& view_android);
#endif
private:
« no previous file with comments | « content/browser/power_save_blocker_android.cc ('k') | content/browser/wake_lock/wake_lock_service_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698