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..eb052adc49d58b21e3ca0e1ea65aa318534df8c7 |
| --- /dev/null |
| +++ b/content/renderer/wake_lock/wake_lock_dispatcher.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
nasko
2015/04/28 23:57:37
2015
|
| +// 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/WebWakeLockClient.h" |
| + |
| +namespace content { |
| + |
| +// WakeLockDispatcher is a delegate for WakeLock messages used by WebKit. |
|
nasko
2015/04/28 23:57:37
s/WebKit/Blink/
|
| +// It's the complement of WakeLockDispatcherHost. |
| +class WakeLockDispatcher |
| + : public RenderFrameObserver, |
| + NON_EXPORTED_BASE(public blink::WebWakeLockClient) { |
|
mlamouri (slow - plz ping)
2015/05/05 14:08:34
Do you need NON_EXPORTED_BASE?
|
| + public: |
| + explicit WakeLockDispatcher(RenderFrame* render_frame); |
| + virtual ~WakeLockDispatcher(); |
| + |
| + private: |
| + // WebWakeLockClient |
| + void requestKeepScreenAwake(bool intention) override; |
| + |
| + WakeLockServicePtr wake_lock_service_; |
| +}; |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_H_ |