| 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_OBJECT_H_ | 5 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_OBJECT_H_ |
| 6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_OBJECT_H_ | 6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_OBJECT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 class GinJavaBridgeObject : public gin::Wrappable<GinJavaBridgeObject>, | 26 class GinJavaBridgeObject : public gin::Wrappable<GinJavaBridgeObject>, |
| 27 public gin::NamedPropertyInterceptor { | 27 public gin::NamedPropertyInterceptor { |
| 28 public: | 28 public: |
| 29 static gin::WrapperInfo kWrapperInfo; | 29 static gin::WrapperInfo kWrapperInfo; |
| 30 | 30 |
| 31 GinJavaBridgeDispatcher::ObjectID object_id() const { return object_id_; } | 31 GinJavaBridgeDispatcher::ObjectID object_id() const { return object_id_; } |
| 32 | 32 |
| 33 // gin::Wrappable. | 33 // gin::Wrappable. |
| 34 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( | 34 virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| 35 v8::Isolate* isolate) OVERRIDE; | 35 v8::Isolate* isolate) override; |
| 36 | 36 |
| 37 // gin::NamedPropertyInterceptor | 37 // gin::NamedPropertyInterceptor |
| 38 virtual v8::Local<v8::Value> GetNamedProperty( | 38 virtual v8::Local<v8::Value> GetNamedProperty( |
| 39 v8::Isolate* isolate, const std::string& property) OVERRIDE; | 39 v8::Isolate* isolate, const std::string& property) override; |
| 40 virtual std::vector<std::string> EnumerateNamedProperties( | 40 virtual std::vector<std::string> EnumerateNamedProperties( |
| 41 v8::Isolate* isolate) OVERRIDE; | 41 v8::Isolate* isolate) override; |
| 42 | 42 |
| 43 static GinJavaBridgeObject* InjectNamed( | 43 static GinJavaBridgeObject* InjectNamed( |
| 44 blink::WebFrame* frame, | 44 blink::WebFrame* frame, |
| 45 const base::WeakPtr<GinJavaBridgeDispatcher>& dispatcher, | 45 const base::WeakPtr<GinJavaBridgeDispatcher>& dispatcher, |
| 46 const std::string& object_name, | 46 const std::string& object_name, |
| 47 GinJavaBridgeDispatcher::ObjectID object_id); | 47 GinJavaBridgeDispatcher::ObjectID object_id); |
| 48 static GinJavaBridgeObject* InjectAnonymous( | 48 static GinJavaBridgeObject* InjectAnonymous( |
| 49 const base::WeakPtr<GinJavaBridgeDispatcher>& dispatcher, | 49 const base::WeakPtr<GinJavaBridgeDispatcher>& dispatcher, |
| 50 GinJavaBridgeDispatcher::ObjectID object_id); | 50 GinJavaBridgeDispatcher::ObjectID object_id); |
| 51 | 51 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 62 GinJavaBridgeDispatcher::ObjectID object_id_; | 62 GinJavaBridgeDispatcher::ObjectID object_id_; |
| 63 scoped_ptr<GinJavaBridgeValueConverter> converter_; | 63 scoped_ptr<GinJavaBridgeValueConverter> converter_; |
| 64 std::map<std::string, bool> known_methods_; | 64 std::map<std::string, bool> known_methods_; |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeObject); | 66 DISALLOW_COPY_AND_ASSIGN(GinJavaBridgeObject); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace content | 69 } // namespace content |
| 70 | 70 |
| 71 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_OBJECT_H_ | 71 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_BRIDGE_OBJECT_H_ |
| OLD | NEW |