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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 1393203004: Reland of Wake Lock API implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix presubmit errors Created 5 years, 2 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 1f4768b2dd5c541788b4a108dbaa241c87bee683..0e1187ca63b27658d26b5fa2556d786038057498 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -108,6 +108,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"
@@ -724,6 +725,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),
@@ -3597,6 +3599,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