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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1107333002: Wake Lock API implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added visibility check to browsertest Created 5 years, 3 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 | « content/renderer/render_frame_impl.h ('k') | content/renderer/wake_lock/wake_lock_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index f5d90c62c10cfa3267f72f938a5122b6eb5c275a..4c5aa652913424bae053134294d1c9c45625e135 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -106,6 +106,7 @@
#include "content/renderer/shared_worker_repository.h"
#include "content/renderer/skia_benchmarking_extension.h"
#include "content/renderer/stats_collection_controller.h"
+#include "content/renderer/wake_lock/wake_lock_dispatcher.h"
#include "content/renderer/web_ui_extension.h"
#include "content/renderer/websharedworker_proxy.h"
#include "gin/modules/module_registry.h"
@@ -736,6 +737,7 @@ RenderFrameImpl::RenderFrameImpl(const CreateParams& params)
#endif
has_played_media_(false),
devtools_agent_(nullptr),
+ wakelock_dispatcher_(nullptr),
geolocation_dispatcher_(NULL),
push_messaging_dispatcher_(NULL),
presentation_dispatcher_(NULL),
@@ -3575,6 +3577,12 @@ void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
impl->set_render_frame_id(routing_id_);
}
+blink::WebWakeLockClient* RenderFrameImpl::wakeLockClient() {
+ if (!wakelock_dispatcher_)
+ wakelock_dispatcher_ = new WakeLockDispatcher(this);
+ return wakelock_dispatcher_;
+}
+
blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() {
if (!geolocation_dispatcher_)
geolocation_dispatcher_ = new GeolocationDispatcher(this);
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | content/renderer/wake_lock/wake_lock_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698