OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // IPC messages for wake lock. |
| 6 // Multiply-included message file, hence no include guard. |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "third_party/WebKit/public/platform/WebWakeLockRequestInfo.h" |
| 11 #include "url/gurl.h" |
| 12 |
| 13 #undef IPC_MESSAGE_EXPORT |
| 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 15 |
| 16 #define IPC_MESSAGE_START WakeLockMsgStart |
| 17 |
| 18 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebWakeLockType, |
| 19 blink::WebWakeLockScreen, |
| 20 blink::WebWakeLockGuard) |
| 21 |
| 22 IPC_STRUCT_TRAITS_BEGIN(blink::WakeLockRequestInfo) |
| 23 IPC_STRUCT_TRAITS_MEMBER(type) |
| 24 IPC_STRUCT_TRAITS_MEMBER(requestId) |
| 25 IPC_STRUCT_TRAITS_MEMBER(contextId) |
| 26 IPC_STRUCT_TRAITS_END() |
| 27 |
| 28 // Asks the browser process to create wake lock if necessary. |
| 29 IPC_MESSAGE_ROUTED2(WakeLockViewHostMsg_RequestLock, |
| 30 blink::WakeLockRequestInfo /* params */, |
| 31 GURL /* GURL of the frame requesting wake lock */) |
| 32 IPC_MESSAGE_ROUTED1(WakeLockViewHostMsg_RequestUnlock, |
| 33 blink::WakeLockRequestInfo /* params */) |
| 34 |
| 35 // Answer from browser to renderer about created wakeLock |
| 36 IPC_MESSAGE_ROUTED1(WakeLockViewMsg_LockedSuccessful, int /* request_id */) |
| 37 IPC_MESSAGE_ROUTED1(WakeLockViewMsg_LockedFailed, int /* request_id */) |
| 38 |
| 39 // Answer from browser to renderer about unlocked wakeLock |
| 40 IPC_MESSAGE_ROUTED1(WakeLockViewMsg_UnlockedSuccessful, int /* request_id */) |
| 41 IPC_MESSAGE_ROUTED1(WakeLockViewMsg_UnlockedFailed, int /* request_id */) |
OLD | NEW |