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

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

Issue 603893002: Apply automatic range checks to content enum types across IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes made as per comments Created 6 years, 2 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/common/android/gin_java_bridge_errors.h ('k') | no next file » | 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 injected Java objects (Gin-based implementation). 5 // IPC messages for injected Java objects (Gin-based implementation).
6 6
7 // Multiply-included message file, hence no include guard. 7 // Multiply-included message file, hence no include guard.
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "content/common/android/gin_java_bridge_errors.h" 10 #include "content/common/android/gin_java_bridge_errors.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "ipc/ipc_message_macros.h" 12 #include "ipc/ipc_message_macros.h"
13 13
14 #undef IPC_MESSAGE_EXPORT 14 #undef IPC_MESSAGE_EXPORT
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
16 #define IPC_MESSAGE_START GinJavaBridgeMsgStart 16 #define IPC_MESSAGE_START GinJavaBridgeMsgStart
17 17
18 // Messages for handling Java objects injected into JavaScript ----------------- 18 // Messages for handling Java objects injected into JavaScript -----------------
19 19
20 IPC_ENUM_TRAITS(content::GinJavaBridgeError) 20 IPC_ENUM_TRAITS_MAX_VALUE(content::GinJavaBridgeError,
21 content::kGinJavaBridgeErrorLast)
21 22
22 // Sent from browser to renderer to add a Java object with the given name. 23 // Sent from browser to renderer to add a Java object with the given name.
23 // Object IDs are generated on the browser side. 24 // Object IDs are generated on the browser side.
24 IPC_MESSAGE_ROUTED2(GinJavaBridgeMsg_AddNamedObject, 25 IPC_MESSAGE_ROUTED2(GinJavaBridgeMsg_AddNamedObject,
25 std::string /* name */, 26 std::string /* name */,
26 int32 /* object_id */) 27 int32 /* object_id */)
27 28
28 // Sent from browser to renderer to remove a Java object with the given name. 29 // Sent from browser to renderer to remove a Java object with the given name.
29 IPC_MESSAGE_ROUTED1(GinJavaBridgeMsg_RemoveNamedObject, 30 IPC_MESSAGE_ROUTED1(GinJavaBridgeMsg_RemoveNamedObject,
30 std::string /* name */) 31 std::string /* name */)
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // 1. (Main usage) To inform that the JS wrapper of the object has 65 // 1. (Main usage) To inform that the JS wrapper of the object has
65 // been completely dereferenced and garbage-collected. 66 // been completely dereferenced and garbage-collected.
66 // 67 //
67 // 2. To notify the browser that wrapper creation has failed. The browser side 68 // 2. To notify the browser that wrapper creation has failed. The browser side
68 // assumes optimistically that every time an object is returned from a 69 // assumes optimistically that every time an object is returned from a
69 // method, the corresponding wrapper object will be successfully created on 70 // method, the corresponding wrapper object will be successfully created on
70 // the renderer side. Sending of this message informs the browser whether 71 // the renderer side. Sending of this message informs the browser whether
71 // this expectation has failed. 72 // this expectation has failed.
72 IPC_MESSAGE_ROUTED1(GinJavaBridgeHostMsg_ObjectWrapperDeleted, 73 IPC_MESSAGE_ROUTED1(GinJavaBridgeHostMsg_ObjectWrapperDeleted,
73 int32 /* object_id */) 74 int32 /* object_id */)
OLDNEW
« no previous file with comments | « content/common/android/gin_java_bridge_errors.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698