Chromium Code Reviews| Index: content/browser/wake_lock/wake_lock_dispatcher_host.h |
| diff --git a/content/browser/wake_lock/wake_lock_dispatcher_host.h b/content/browser/wake_lock/wake_lock_dispatcher_host.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e82354b06a4b57682fd3f6f8b810964d2c90c267 |
| --- /dev/null |
| +++ b/content/browser/wake_lock/wake_lock_dispatcher_host.h |
| @@ -0,0 +1,39 @@ |
| +// Copyright 2014 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_BROWSER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_HOST_H_ |
| +#define CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_HOST_H_ |
| + |
| +#include "content/public/browser/web_contents_observer.h" |
| + |
| +namespace blink { |
| +struct WakeLockRequestInfo; |
|
mlamouri (slow - plz ping)
2014/09/03 13:20:57
Where is that declared? CL 399313003 doesn't seem
|
| +} |
| + |
| +namespace content { |
| + |
| +class WebContents; |
| + |
| +class CONTENT_EXPORT WakeLockDispatcherHost |
| + : public WebContentsObserver { |
| + public: |
| + explicit WakeLockDispatcherHost(WebContents* web_contents); |
| + virtual ~WakeLockDispatcherHost(); |
| + |
| + // WebContentsObserver |
| + virtual bool OnMessageReceived(const IPC::Message&) OVERRIDE; |
| + |
| + private: |
| + void OnRequestWakeLock(const blink::WakeLockRequestInfo& info, |
| + const GURL& url); |
| + void OnRequestWakeUnlock(const blink::WakeLockRequestInfo& info); |
| + |
| + void SendWakeLockPermissionResponse(const blink::WakeLockRequestInfo& info, |
| + bool allowed); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WakeLockDispatcherHost); |
| +}; |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_HOST_H_ |