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

Side by Side Diff: content/common/screen_orientation_messages.h

Issue 2391883006: Mojo-ify implementation of screen orientation locking/unlocking. (Closed)
Patch Set: Code review changes (as to PS7) Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // IPC messages for screen orientation. 5 // IPC messages for screen orientation.
6 // Multiply-included message file, hence no include guard. 6 // Multiply-included message file, hence no include guard.
7 7
8 #include "content/common/content_export.h" 8 #include "content/common/content_export.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO rientationError.h" 10 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebLockO rientationError.h"
11 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h" 11 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h"
12 12
13 #undef IPC_MESSAGE_EXPORT 13 #undef IPC_MESSAGE_EXPORT
14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
15 15
16 #define IPC_MESSAGE_START ScreenOrientationMsgStart 16 #define IPC_MESSAGE_START ScreenOrientationMsgStart
17 17
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)
25
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 */)
32
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 */)
40
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 */)
49
50 // The renderer process requests the browser process to unlock the screen
51 // orientation.
52 IPC_MESSAGE_ROUTED0(ScreenOrientationHostMsg_Unlock)
53
54 // The renderer process is now using the Screen Orientation API and informs the 18 // 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 19 // browser process that it should start accurately listening to the screen
56 // orientation if it wasn't already. 20 // orientation if it wasn't already.
57 // This is only expected to be acted upon when the underlying platform requires 21 // This is only expected to be acted upon when the underlying platform requires
58 // heavy work in order to accurately know the screen orientation. 22 // heavy work in order to accurately know the screen orientation.
59 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_StartListening) 23 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_StartListening)
60 24
61 // The renderer process is no longer using the Screen Orientation API and 25 // 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 26 // informs the browser process that it can stop accurately listening to the
63 // screen orientation if no other process cares about it. 27 // screen orientation if no other process cares about it.
64 // This is only expected to be acted upon when the underlying platform requires 28 // This is only expected to be acted upon when the underlying platform requires
65 // heavy work in order to accurately know the screen orientation. 29 // heavy work in order to accurately know the screen orientation.
66 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_StopListening) 30 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_StopListening)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698