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

Unified Diff: content/browser/wake_lock/wake_lock_dispatcher_host.h

Issue 474913003: WakeLock API: IPC at browser side. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698