Chromium Code Reviews| Index: content/renderer/wake_lock/wake_lock_dispatcher.h |
| diff --git a/content/renderer/wake_lock/wake_lock_dispatcher.h b/content/renderer/wake_lock/wake_lock_dispatcher.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4f6b8e3849c2a3b5eb182bcde5cfab9884c32ada |
| --- /dev/null |
| +++ b/content/renderer/wake_lock/wake_lock_dispatcher.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ |
| +#define CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ |
| + |
| +#include "content/common/wake_lock_service.mojom.h" |
| +#include "content/public/renderer/render_frame_observer.h" |
| +#include "third_party/WebKit/public/platform/modules/wake_lock/WebWakeLockClient.h" |
| + |
| +namespace content { |
| + |
| +// 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.
|
| +// It's the complement of WakeLockDispatcherHost. |
| +class WakeLockDispatcher |
| + : public RenderFrameObserver, |
| + public blink::WebWakeLockClient { |
| + public: |
| + explicit WakeLockDispatcher(RenderFrame* render_frame); |
| + 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
|
| + |
| + private: |
| + // WebWakeLockClient |
|
mlamouri (slow - plz ping)
2015/08/06 09:18:51
// WebWakeLockClient implementation.
alogvinov
2015/08/11 13:06:43
Done.
|
| + 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.
|
| + |
| + WakeLockServicePtr wake_lock_service_; |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ |