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

Unified Diff: content/common/wake_lock_messages.h

Issue 471763006: IPC messages for WakeLock API 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
« no previous file with comments | « content/common/content_message_generator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/wake_lock_messages.h
diff --git a/content/common/wake_lock_messages.h b/content/common/wake_lock_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..6d26adef458fa35aecc20a1ee8535e95eff356af
--- /dev/null
+++ b/content/common/wake_lock_messages.h
@@ -0,0 +1,41 @@
+// 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.
+
+// IPC messages for wake lock.
+// Multiply-included message file, hence no include guard.
+
+#include "content/common/content_export.h"
+#include "ipc/ipc_message_macros.h"
+#include "third_party/WebKit/public/platform/WebWakeLockRequestInfo.h"
+#include "url/gurl.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+
+#define IPC_MESSAGE_START WakeLockMsgStart
+
+IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebWakeLockType,
+ blink::WebWakeLockScreen,
+ blink::WebWakeLockGuard)
+
+IPC_STRUCT_TRAITS_BEGIN(blink::WakeLockRequestInfo)
+ IPC_STRUCT_TRAITS_MEMBER(type)
+ IPC_STRUCT_TRAITS_MEMBER(requestId)
+ IPC_STRUCT_TRAITS_MEMBER(contextId)
+IPC_STRUCT_TRAITS_END()
+
+// Asks the browser process to create wake lock if necessary.
+IPC_MESSAGE_ROUTED2(WakeLockViewHostMsg_RequestLock,
+ blink::WakeLockRequestInfo /* params */,
+ GURL /* GURL of the frame requesting wake lock */)
+IPC_MESSAGE_ROUTED1(WakeLockViewHostMsg_RequestUnlock,
+ blink::WakeLockRequestInfo /* params */)
+
+// Answer from browser to renderer about created wakeLock
+IPC_MESSAGE_ROUTED1(WakeLockViewMsg_LockedSuccessful, int /* request_id */)
+IPC_MESSAGE_ROUTED1(WakeLockViewMsg_LockedFailed, int /* request_id */)
+
+// Answer from browser to renderer about unlocked wakeLock
+IPC_MESSAGE_ROUTED1(WakeLockViewMsg_UnlockedSuccessful, int /* request_id */)
+IPC_MESSAGE_ROUTED1(WakeLockViewMsg_UnlockedFailed, int /* request_id */)
« no previous file with comments | « content/common/content_message_generator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698