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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_
6 #define CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
10 #include "content/renderer/java/gin_java_bridge_dispatcher.h"
11 #include "gin/arguments.h"
12 #include "gin/handle.h"
16 class GinJavaBridgeValueConverter
;
18 class GinJavaFunctionInvocationHelper
{
20 GinJavaFunctionInvocationHelper(
21 const std::string
& method_name
,
22 const base::WeakPtr
<GinJavaBridgeDispatcher
>& dispatcher
);
23 ~GinJavaFunctionInvocationHelper();
25 v8::Local
<v8::Value
> Invoke(gin::Arguments
* args
);
28 std::string method_name_
;
29 base::WeakPtr
<GinJavaBridgeDispatcher
> dispatcher_
;
30 scoped_ptr
<GinJavaBridgeValueConverter
> converter_
;
32 DISALLOW_COPY_AND_ASSIGN(GinJavaFunctionInvocationHelper
);
35 } // namespace content
37 #endif // CONTENT_RENDERER_JAVA_GIN_JAVA_FUNCTION_INVOCATION_HELPER_H_