OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const base::android::ScopedJavaLocalRef<jobject>& js_result); | 57 const base::android::ScopedJavaLocalRef<jobject>& js_result); |
58 | 58 |
59 // |handler| is an instance of | 59 // |handler| is an instance of |
60 // org.chromium.android_webview.AwHttpAuthHandler. | 60 // org.chromium.android_webview.AwHttpAuthHandler. |
61 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler, | 61 void onReceivedHttpAuthRequest(const base::android::JavaRef<jobject>& handler, |
62 const std::string& host, | 62 const std::string& host, |
63 const std::string& realm); | 63 const std::string& realm); |
64 | 64 |
65 // Methods called from Java. | 65 // Methods called from Java. |
66 jint GetWebContents(JNIEnv* env, jobject obj); | 66 jint GetWebContents(JNIEnv* env, jobject obj); |
| 67 void SetWebContents(JNIEnv* env, jobject obj, jint web_contents); |
67 void Destroy(JNIEnv* env, jobject obj); | 68 void Destroy(JNIEnv* env, jobject obj); |
68 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message); | 69 void DocumentHasImages(JNIEnv* env, jobject obj, jobject message); |
69 void GenerateMHTML(JNIEnv* env, jobject obj, jstring jpath, jobject callback); | 70 void GenerateMHTML(JNIEnv* env, jobject obj, jstring jpath, jobject callback); |
70 void SetIoThreadClient(JNIEnv* env, jobject obj, jobject client); | 71 void SetIoThreadClient(JNIEnv* env, jobject obj, jobject client); |
71 void SetInterceptNavigationDelegate(JNIEnv* env, jobject obj, | 72 void SetInterceptNavigationDelegate(JNIEnv* env, jobject obj, |
72 jobject delegate); | 73 jobject delegate); |
73 base::android::ScopedJavaLocalRef<jbyteArray> GetCertificate( | 74 base::android::ScopedJavaLocalRef<jbyteArray> GetCertificate( |
74 JNIEnv* env, jobject obj); | 75 JNIEnv* env, jobject obj); |
75 void RequestNewHitTestDataAt(JNIEnv* env, jobject obj, jint x, jint y); | 76 void RequestNewHitTestDataAt(JNIEnv* env, jobject obj, jint x, jint y); |
76 void UpdateLastHitTestData(JNIEnv* env, jobject obj); | 77 void UpdateLastHitTestData(JNIEnv* env, jobject obj); |
(...skipping 11 matching lines...) Expand all Loading... |
88 void ClearMatches(JNIEnv* env, jobject obj); | 89 void ClearMatches(JNIEnv* env, jobject obj); |
89 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); | 90 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); |
90 | 91 |
91 FindHelper* GetFindHelper(); | 92 FindHelper* GetFindHelper(); |
92 | 93 |
93 // FindHelper::Listener implementation. | 94 // FindHelper::Listener implementation. |
94 virtual void OnFindResultReceived(int active_ordinal, | 95 virtual void OnFindResultReceived(int active_ordinal, |
95 int match_count, | 96 int match_count, |
96 bool finished) OVERRIDE; | 97 bool finished) OVERRIDE; |
97 | 98 |
| 99 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); |
| 100 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); |
| 101 |
98 private: | 102 private: |
| 103 void SetWebContents(content::WebContents* web_contents); |
| 104 |
99 JavaObjectWeakGlobalRef java_ref_; | 105 JavaObjectWeakGlobalRef java_ref_; |
100 scoped_ptr<content::WebContents> web_contents_; | 106 scoped_ptr<content::WebContents> web_contents_; |
101 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 107 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
102 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 108 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
103 scoped_ptr<FindHelper> find_helper_; | 109 scoped_ptr<FindHelper> find_helper_; |
| 110 scoped_ptr<content::WebContents> pending_contents_; |
104 | 111 |
105 DISALLOW_COPY_AND_ASSIGN(AwContents); | 112 DISALLOW_COPY_AND_ASSIGN(AwContents); |
106 }; | 113 }; |
107 | 114 |
108 bool RegisterAwContents(JNIEnv* env); | 115 bool RegisterAwContents(JNIEnv* env); |
109 | 116 |
110 } // namespace android_webview | 117 } // namespace android_webview |
111 | 118 |
112 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 119 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |