OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_FUNCTION_INVOCATION_HELPER_H_ | 5 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_ |
6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_ | 6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "content/renderer/java/gin_java_bridge_dispatcher.h" | 10 #include "content/renderer/java/gin_java_bridge_dispatcher.h" |
11 #include "gin/arguments.h" | 11 #include "gin/arguments.h" |
12 #include "gin/handle.h" | 12 #include "gin/handle.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 class GinJavaBridgeValueConverter; | 16 class GinJavaBridgeValueConverter; |
17 | 17 |
18 class GinJavaFunctionInvocationHelper { | 18 class GinJavaFunctionInvocationHelper { |
19 public: | 19 public: |
20 GinJavaFunctionInvocationHelper( | 20 GinJavaFunctionInvocationHelper( |
21 const std::string& method_name, | 21 const std::string& method_name, |
22 const base::WeakPtr<GinJavaBridgeDispatcher>& dispatcher); | 22 const base::WeakPtr<GinJavaBridgeDispatcher>& dispatcher); |
23 ~GinJavaFunctionInvocationHelper(); | 23 ~GinJavaFunctionInvocationHelper(); |
24 | 24 |
25 v8::Handle<v8::Value> Invoke(gin::Arguments* args); | 25 v8::Local<v8::Value> Invoke(gin::Arguments* args); |
26 | 26 |
27 private: | 27 private: |
28 std::string method_name_; | 28 std::string method_name_; |
29 base::WeakPtr<GinJavaBridgeDispatcher> dispatcher_; | 29 base::WeakPtr<GinJavaBridgeDispatcher> dispatcher_; |
30 scoped_ptr<GinJavaBridgeValueConverter> converter_; | 30 scoped_ptr<GinJavaBridgeValueConverter> converter_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(GinJavaFunctionInvocationHelper); | 32 DISALLOW_COPY_AND_ASSIGN(GinJavaFunctionInvocationHelper); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace content | 35 } // namespace content |
36 | 36 |
37 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_ | 37 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_ |
OLD | NEW |