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

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

Issue 406483004: Initial implementation of API WakeLock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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..f16824aa667f9d9a10e634a6f767ec6b5d72a06d
--- /dev/null
+++ b/content/browser/wake_lock/wake_lock_dispatcher_host.h
@@ -0,0 +1,36 @@
+// Copyright (c) 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/browser_message_filter.h"
+
+namespace content {
+class WakeLockPermissionContext;
+
+class WakeLockDispatcherHost
+ : public content::BrowserMessageFilter {
+ public:
+ explicit WakeLockDispatcherHost(
+ int render_process_id,
+ WakeLockPermissionContext* wakelock_context);
+
+ private:
+ virtual ~WakeLockDispatcherHost();
+
+ // BrowserMessageFilter implementation.
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ void OnRequestWakeLockScreen(int routed_id);
+ void OnRequestWakeUnlockScreen(int routed_id);
+
+ int render_process_id_;
+ scoped_refptr<WakeLockPermissionContext> wakelock_permission_context_;
+
+ DISALLOW_COPY_AND_ASSIGN(WakeLockDispatcherHost);
+};
+}
+
+#endif // CONTENT_BROWSER_WAKE_LOCK_WAKE_LOCK_DISPATCHER_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698