OLD | NEW |
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 <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 bool HasJavaMethod(ObjectID object_id, const std::string& method_name); | 52 bool HasJavaMethod(ObjectID object_id, const std::string& method_name); |
53 std::unique_ptr<base::Value> InvokeJavaMethod( | 53 std::unique_ptr<base::Value> InvokeJavaMethod( |
54 ObjectID object_id, | 54 ObjectID object_id, |
55 const std::string& method_name, | 55 const std::string& method_name, |
56 const base::ListValue& arguments, | 56 const base::ListValue& arguments, |
57 GinJavaBridgeError* error); | 57 GinJavaBridgeError* error); |
58 GinJavaBridgeObject* GetObject(ObjectID object_id); | 58 GinJavaBridgeObject* GetObject(ObjectID object_id); |
59 void OnGinJavaBridgeObjectDeleted(GinJavaBridgeObject* object); | 59 void OnGinJavaBridgeObjectDeleted(GinJavaBridgeObject* object); |
60 | 60 |
61 private: | 61 private: |
| 62 // RenderFrameObserver implementation. |
| 63 void OnDestruct() override; |
| 64 |
62 void OnAddNamedObject(const std::string& name, | 65 void OnAddNamedObject(const std::string& name, |
63 ObjectID object_id); | 66 ObjectID object_id); |
64 void OnRemoveNamedObject(const std::string& name); | 67 void OnRemoveNamedObject(const std::string& name); |
65 void OnSetAllowObjectContentsInspection(bool allow); | 68 void OnSetAllowObjectContentsInspection(bool allow); |
66 | 69 |
67 typedef std::map<std::string, ObjectID> NamedObjectMap; | 70 typedef std::map<std::string, ObjectID> NamedObjectMap; |
68 NamedObjectMap named_objects_; | 71 NamedObjectMap named_objects_; |
69 ObjectMap objects_; | 72 ObjectMap objects_; |
70 bool inside_did_clear_window_object_; | 73 bool inside_did_clear_window_object_; |
71 | 74 |
72 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcher); | 75 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeDispatcher); |
73 }; | 76 }; |
74 | 77 |
75 } // namespace content | 78 } // namespace content |
76 | 79 |
77 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_ | 80 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_DISPATCHER_H_ |
OLD | NEW |