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

Side by Side Diff: content/browser/renderer_host/java/java_method.h

Issue 345753003: [Android] Java Bridge with Gin: implement Java Bridge dispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use an enum for passing error codes Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_JAVA_JAVA_METHOD_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_METHOD_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_METHOD_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_METHOD_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/android/scoped_java_ref.h" 12 #include "base/android/scoped_java_ref.h"
13 #include "content/browser/renderer_host/java/java_type.h" 13 #include "content/browser/renderer_host/java/java_type.h"
14 #include "content/common/content_export.h"
14 15
15 namespace content { 16 namespace content {
16 17
17 // Wrapper around java.lang.reflect.Method. This class must be used on a single 18 // Wrapper around java.lang.reflect.Method. This class must be used on a single
18 // thread only. 19 // thread only.
19 class JavaMethod { 20 class CONTENT_EXPORT JavaMethod {
20 public: 21 public:
21 explicit JavaMethod(const base::android::JavaRef<jobject>& method); 22 explicit JavaMethod(const base::android::JavaRef<jobject>& method);
22 ~JavaMethod(); 23 ~JavaMethod();
23 24
24 const std::string& name() const { return name_; } 25 const std::string& name() const { return name_; }
25 size_t num_parameters() const; 26 size_t num_parameters() const;
26 bool is_static() const; 27 bool is_static() const;
27 const JavaType& parameter_type(size_t index) const; 28 const JavaType& parameter_type(size_t index) const;
28 const JavaType& return_type() const; 29 const JavaType& return_type() const;
29 jmethodID id() const; 30 jmethodID id() const;
(...skipping 10 matching lines...) Expand all
40 mutable JavaType return_type_; 41 mutable JavaType return_type_;
41 mutable bool is_static_; 42 mutable bool is_static_;
42 mutable jmethodID id_; 43 mutable jmethodID id_;
43 44
44 DISALLOW_IMPLICIT_CONSTRUCTORS(JavaMethod); 45 DISALLOW_IMPLICIT_CONSTRUCTORS(JavaMethod);
45 }; 46 };
46 47
47 } // namespace content 48 } // namespace content
48 49
49 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_METHOD_H_ 50 #endif // CONTENT_BROWSER_RENDERER_HOST_JAVA_JAVA_METHOD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698