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

Side by Side Diff: content/renderer/wake_lock/wake_lock_dispatcher.h

Issue 1107333002: Wake Lock API implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_
6 #define CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_
7
8 #include "content/common/wake_lock_service.mojom.h"
9 #include "content/public/renderer/render_frame_observer.h"
10 #include "third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient .h"
11
12 namespace content {
13
14 // WakeLockDispatcher is a delegate for WakeLock messages used by Blink.
mlamouri (slow - plz ping) 2015/08/06 09:18:51 "dispatcher" is a "delegate" is odd. Why not just
alogvinov 2015/08/11 13:06:43 Done.
15 // It's the complement of WakeLockDispatcherHost.
16 class WakeLockDispatcher
17 : public RenderFrameObserver,
18 public blink::WebWakeLockClient {
19 public:
20 explicit WakeLockDispatcher(RenderFrame* render_frame);
21 virtual ~WakeLockDispatcher();
mlamouri (slow - plz ping) 2015/08/06 09:18:51 ~WakeLockDispatcher() override = default;
alogvinov 2015/08/11 13:06:43 This produces "[chromium-style] Complex destructor
22
23 private:
24 // WebWakeLockClient
mlamouri (slow - plz ping) 2015/08/06 09:18:51 // WebWakeLockClient implementation.
alogvinov 2015/08/11 13:06:43 Done.
25 void requestKeepScreenAwake(bool keepScreenAwake) override;
mlamouri (slow - plz ping) 2015/08/06 09:18:51 no "override" for Blink API implementation. Use "v
alogvinov 2015/08/11 13:06:43 Done.
26
27 WakeLockServicePtr wake_lock_service_;
28 };
29
30 } // namespace content
31
32 #endif // CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698