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

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

Issue 327573002: Properly route screen orientation IPC messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screen_lock_view
Patch Set: review comments Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/WebLockOrientationCallback.h" 10 #include "third_party/WebKit/public/platform/WebLockOrientationCallback.h"
(...skipping 11 matching lines...) Expand all
22 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationLockType, 22 IPC_ENUM_TRAITS_MIN_MAX_VALUE(blink::WebScreenOrientationLockType,
23 blink::WebScreenOrientationLockDefault, 23 blink::WebScreenOrientationLockDefault,
24 blink::WebScreenOrientationLockPortrait) 24 blink::WebScreenOrientationLockPortrait)
25 IPC_ENUM_TRAITS_MIN_MAX_VALUE( 25 IPC_ENUM_TRAITS_MIN_MAX_VALUE(
26 blink::WebLockOrientationCallback::ErrorType, 26 blink::WebLockOrientationCallback::ErrorType,
27 blink::WebLockOrientationCallback::ErrorTypeNotAvailable, 27 blink::WebLockOrientationCallback::ErrorTypeNotAvailable,
28 blink::WebLockOrientationCallback::ErrorTypeCanceled) 28 blink::WebLockOrientationCallback::ErrorTypeCanceled)
29 29
30 // The browser process informs the renderer process that the screen orientation 30 // The browser process informs the renderer process that the screen orientation
31 // has changed. |orientation| contains the new screen orientation in degrees. 31 // has changed. |orientation| contains the new screen orientation in degrees.
32 // TODO(mlamouri): we could probably get rid of it.
32 IPC_MESSAGE_CONTROL1(ScreenOrientationMsg_OrientationChange, 33 IPC_MESSAGE_CONTROL1(ScreenOrientationMsg_OrientationChange,
33 blink::WebScreenOrientationType /* orientation */ ) 34 blink::WebScreenOrientationType /* orientation */ )
34 35
35 // The browser process' response to a ScreenOrientationHostMsg_LockRequest when 36 // The browser process' response to a ScreenOrientationHostMsg_LockRequest when
36 // the lock actually succeeded. The message includes the new |angle| and |type| 37 // the lock actually succeeded. The message includes the new |angle| and |type|
37 // of orientation. The |request_id| passed when receiving the request is passed 38 // of orientation. The |request_id| passed when receiving the request is passed
38 // back so the renderer process can associate the response to the right request. 39 // back so the renderer process can associate the response to the right request.
39 IPC_MESSAGE_CONTROL3(ScreenOrientationMsg_LockSuccess, 40 IPC_MESSAGE_ROUTED3(ScreenOrientationMsg_LockSuccess,
40 int, /* request_id */ 41 int, /* request_id */
41 unsigned, /* angle */ 42 unsigned, /* angle */
42 blink::WebScreenOrientationType /* type */) 43 blink::WebScreenOrientationType /* type */)
43 44
44 // The browser process' response to a ScreenOrientationHostMsg_LockRequest when 45 // The browser process' response to a ScreenOrientationHostMsg_LockRequest when
45 // the lock actually failed. The message includes the |error| type. The 46 // the lock actually failed. The message includes the |error| type. The
46 // |request_id| passed when receiving the request is passed back so the renderer 47 // |request_id| passed when receiving the request is passed back so the renderer
47 // process can associate the response to the right request. 48 // process can associate the response to the right request.
48 IPC_MESSAGE_CONTROL2(ScreenOrientationMsg_LockError, 49 IPC_MESSAGE_ROUTED2(ScreenOrientationMsg_LockError,
49 int, /* request_id */ 50 int, /* request_id */
50 blink::WebLockOrientationCallback::ErrorType /* error */); 51 blink::WebLockOrientationCallback::ErrorType /* error */);
51 52
52 // The renderer process requests the browser process to lock the screen 53 // The renderer process requests the browser process to lock the screen
53 // orientation to the specified |orientations|. The request contains a 54 // orientation to the specified |orientations|. The request contains a
54 // |request_id| that will have to be passed back to the renderer process when 55 // |request_id| that will have to be passed back to the renderer process when
55 // notifying about a success or error (see ScreenOrientationMsg_LockError and 56 // notifying about a success or error (see ScreenOrientationMsg_LockError and
56 // ScreenOrientationMsg_LockSuccess). 57 // ScreenOrientationMsg_LockSuccess).
57 IPC_MESSAGE_CONTROL2(ScreenOrientationHostMsg_LockRequest, 58 IPC_MESSAGE_ROUTED2(ScreenOrientationHostMsg_LockRequest,
58 blink::WebScreenOrientationLockType, /* orientation */ 59 blink::WebScreenOrientationLockType, /* orientation */
59 int /* request_id */) 60 int /* request_id */)
60 61
61 // The renderer process requests the browser process to unlock the screen 62 // The renderer process requests the browser process to unlock the screen
62 // orientation. 63 // orientation.
63 IPC_MESSAGE_CONTROL0(ScreenOrientationHostMsg_Unlock) 64 IPC_MESSAGE_ROUTED0(ScreenOrientationHostMsg_Unlock)
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698