Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / content / common / screen_orientation_messages.h
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 screen orientation.
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/WebScreenOrientationLockType.h"
11 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
12
13 #undef IPC_MESSAGE_EXPORT
14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
15
16 #define IPC_MESSAGE_START ScreenOrientationMsgStart
17
18 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationType,
19                               blink::WebScreenOrientationUndefined,
20                               blink::WebScreenOrientationLandscapeSecondary)
21 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationLockType,
22                               blink::WebScreenOrientationLockDefault,
23                               blink::WebScreenOrientationLockPortrait)
24
25 // The browser process informs the renderer process that the screen orientation
26 // has changed. |orientation| contains the new screen orientation in degrees.
27 IPC_MESSAGE_CONTROL1(ScreenOrientationMsg_OrientationChange,
28                      blink::WebScreenOrientationType /* orientation */ )
29
30 // The renderer process requests the browser process to lock the screen
31 // orientation to the specified |orientations|.
32 IPC_MESSAGE_CONTROL1(ScreenOrientationHostMsg_Lock,
33                      blink::WebScreenOrientationLockType /* orientations */ )
34
35 // The renderer process requests the browser process to unlock the screen
36 // orientation.
37 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_Unlock)