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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2893773003: Use wakelock mojo interface instead of PowerSaveBlocker in renderer_host. (Closed)
Patch Set: Use wakelock mojo interface instead of PowerSaveBlocker in renderer_host. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_impl.h
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 67d6dc0f9ff417140273c066eadbf415f63e11e9..8ca51dd5d5a554a3a0c7a779623fa2fc3a770a0a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -53,6 +53,10 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/latency/latency_info.h"
+#if defined(OS_MACOSX)
+#include "device/wake_lock/public/interfaces/wake_lock_service.mojom.h"
+#endif
+
class SkBitmap;
struct FrameHostMsg_HittestData_Params;
struct ViewHostMsg_SelectionBounds_Params;
@@ -68,12 +72,6 @@ namespace cc {
struct BeginFrameAck;
} // namespace cc
-#if defined(OS_MACOSX)
-namespace device {
-class PowerSaveBlocker;
-} // namespace device
-#endif
-
namespace gfx {
class Image;
class Range;
@@ -760,6 +758,10 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// process the messages. Virtual for tests.
virtual void ProcessSwapMessages(std::vector<IPC::Message> messages);
+#if defined(OS_MACOSX)
+ device::mojom::WakeLockService* GetWakeLockService();
+#endif
+
// true if a renderer has once been valid. We use this flag to display a sad
// tab only when we lose our renderer and not if a paint occurs during
// initialization.
@@ -959,7 +961,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
uint32_t last_received_content_source_id_ = 0;
#if defined(OS_MACOSX)
- std::unique_ptr<device::PowerSaveBlocker> power_save_blocker_;
+ device::mojom::WakeLockServicePtr wake_lock_;
#endif
// These information are used to verify that the renderer does not misbehave
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698