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

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: no null check Created 4 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 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..af8c1de1714314f3d2784b3275cec6c7b21dd95f 100644
--- a/content/browser/power_save_blocker_impl.h
+++ b/content/browser/power_save_blocker_impl.h
@@ -14,6 +14,10 @@
#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 +33,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(ui::ViewAndroid* view_android);
+ void ClearViewForSleepBlocker();
#endif
private:

Powered by Google App Engine
This is Rietveld 408576698