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

Side by Side Diff: content/renderer/java/gin_java_bridge_dispatcher.h

Issue 1018413002: [Android] Fix method invocation and wrappers cleanup handling in Java Bridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a dedicated test for attempting to call a non-existing method via `call` Created 5 years, 9 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/renderer/BUILD.gn ('k') | content/renderer/java/gin_java_bridge_dispatcher.cc » ('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 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_
6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_ 6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool OnMessageReceived(const IPC::Message& message) override; 47 bool OnMessageReceived(const IPC::Message& message) override;
48 void DidClearWindowObject() override; 48 void DidClearWindowObject() override;
49 49
50 void GetJavaMethods(ObjectID object_id, std::set<std::string>* methods); 50 void GetJavaMethods(ObjectID object_id, std::set<std::string>* methods);
51 bool HasJavaMethod(ObjectID object_id, const std::string& method_name); 51 bool HasJavaMethod(ObjectID object_id, const std::string& method_name);
52 scoped_ptr<base::Value> InvokeJavaMethod(ObjectID object_id, 52 scoped_ptr<base::Value> InvokeJavaMethod(ObjectID object_id,
53 const std::string& method_name, 53 const std::string& method_name,
54 const base::ListValue& arguments, 54 const base::ListValue& arguments,
55 GinJavaBridgeError* error); 55 GinJavaBridgeError* error);
56 GinJavaBridgeObject* GetObject(ObjectID object_id); 56 GinJavaBridgeObject* GetObject(ObjectID object_id);
57 void OnGinJavaBridgeObjectDeleted(ObjectID object_id); 57 void OnGinJavaBridgeObjectDeleted(GinJavaBridgeObject* object);
58 58
59 private: 59 private:
60 void OnAddNamedObject(const std::string& name, 60 void OnAddNamedObject(const std::string& name,
61 ObjectID object_id); 61 ObjectID object_id);
62 void OnRemoveNamedObject(const std::string& name); 62 void OnRemoveNamedObject(const std::string& name);
63 void OnSetAllowObjectContentsInspection(bool allow); 63 void OnSetAllowObjectContentsInspection(bool allow);
64 64
65 typedef std::map<std::string, ObjectID> NamedObjectMap; 65 typedef std::map<std::string, ObjectID> NamedObjectMap;
66 NamedObjectMap named_objects_; 66 NamedObjectMap named_objects_;
67 ObjectMap objects_; 67 ObjectMap objects_;
68 bool inside_did_clear_window_object_; 68 bool inside_did_clear_window_object_;
69 69
70 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcher); 70 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcher);
71 }; 71 };
72 72
73 } // namespace content 73 } // namespace content
74 74
75 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_ 75 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | content/renderer/java/gin_java_bridge_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698