Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / content / common / screen_orientation_messages.h
blobcb70a7be99b643fa6088b10b9f896a6d0e2ac7e1
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.
5 // IPC messages for screen orientation.
6 // Multiply-included message file, hence no include guard.
8 #include "content/common/content_export.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockOrientationError.h"
11 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
13 #undef IPC_MESSAGE_EXPORT
14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
16 #define IPC_MESSAGE_START ScreenOrientationMsgStart
18 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationLockType,
19 blink::WebScreenOrientationLockDefault,
20 blink::WebScreenOrientationLockNatural)
21 IPC_ENUM_TRAITS_MIN_MAX_VALUE(
22 blink::WebLockOrientationError,
23 blink::WebLockOrientationErrorNotAvailable,
24 blink::WebLockOrientationErrorCanceled)
26 // The browser process' response to a ScreenOrientationHostMsg_LockRequest when
27 // the lock actually succeeded. The |request_id| passed when receiving the
28 // request is passed back so the renderer process can associate the response to
29 // the right request.
30 IPC_MESSAGE_ROUTED1(ScreenOrientationMsg_LockSuccess,
31 int /* request_id */)
33 // The browser process' response to a ScreenOrientationHostMsg_LockRequest when
34 // the lock actually failed. The message includes the |error| type. The
35 // |request_id| passed when receiving the request is passed back so the renderer
36 // process can associate the response to the right request.
37 IPC_MESSAGE_ROUTED2(ScreenOrientationMsg_LockError,
38 int, /* request_id */
39 blink::WebLockOrientationError /* error */)
41 // The renderer process requests the browser process to lock the screen
42 // orientation to the specified |orientations|. The request contains a
43 // |request_id| that will have to be passed back to the renderer process when
44 // notifying about a success or error (see ScreenOrientationMsg_LockError and
45 // ScreenOrientationMsg_LockSuccess).
46 IPC_MESSAGE_ROUTED2(ScreenOrientationHostMsg_LockRequest,
47 blink::WebScreenOrientationLockType, /* orientation */
48 int /* request_id */)
50 // The renderer process requests the browser process to unlock the screen
51 // orientation.
52 IPC_MESSAGE_ROUTED0(ScreenOrientationHostMsg_Unlock)
54 // The renderer process is now using the Screen Orientation API and informs the
55 // browser process that it should start accurately listening to the screen
56 // orientation if it wasn't already.
57 // This is only expected to be acted upon when the underlying platform requires
58 // heavy work in order to accurately know the screen orientation.
59 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_StartListening)
61 // The renderer process is no longer using the Screen Orientation API and
62 // informs the browser process that it can stop accurately listening to the
63 // screen orientation if no other process cares about it.
64 // This is only expected to be acted upon when the underlying platform requires
65 // heavy work in order to accurately know the screen orientation.
66 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_StopListening)