| 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 <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 virtual void Invalidate() OVERRIDE; | 141 virtual void Invalidate() OVERRIDE; |
| 142 virtual void OnNewPicture() OVERRIDE; | 142 virtual void OnNewPicture() OVERRIDE; |
| 143 virtual gfx::Point GetLocationOnScreen() OVERRIDE; | 143 virtual gfx::Point GetLocationOnScreen() OVERRIDE; |
| 144 | 144 |
| 145 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); | 145 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); |
| 146 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); | 146 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); |
| 147 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); | 147 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); |
| 148 | 148 |
| 149 void SetSaveFormData(bool enabled); | 149 void SetSaveFormData(bool enabled); |
| 150 | 150 |
| 151 // Sets the java delegate |
| 152 void SetAwAutofillManagerDelegate(jobject delegate); |
| 151 private: | 153 private: |
| 152 void SetWebContents(content::WebContents* web_contents); | 154 void SetWebContents(content::WebContents* web_contents); |
| 153 void InitAutofillIfNecessary(bool enabled); | 155 void InitAutofillIfNecessary(bool enabled); |
| 154 | 156 |
| 155 JavaObjectWeakGlobalRef java_ref_; | 157 JavaObjectWeakGlobalRef java_ref_; |
| 156 scoped_ptr<content::WebContents> web_contents_; | 158 scoped_ptr<content::WebContents> web_contents_; |
| 157 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 159 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
| 158 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; | 160 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; |
| 159 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 161 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
| 160 scoped_ptr<FindHelper> find_helper_; | 162 scoped_ptr<FindHelper> find_helper_; |
| 161 scoped_ptr<IconHelper> icon_helper_; | 163 scoped_ptr<IconHelper> icon_helper_; |
| 162 scoped_ptr<content::WebContents> pending_contents_; | 164 scoped_ptr<content::WebContents> pending_contents_; |
| 163 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; | 165 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; |
| 164 | 166 |
| 165 // GURL is supplied by the content layer as requesting frame. | 167 // GURL is supplied by the content layer as requesting frame. |
| 166 // Callback is supplied by the content layer, and is invoked with the result | 168 // Callback is supplied by the content layer, and is invoked with the result |
| 167 // from the permission prompt. | 169 // from the permission prompt. |
| 168 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 170 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
| 169 // The first element in the list is always the currently pending request. | 171 // The first element in the list is always the currently pending request. |
| 170 std::list<OriginCallback> pending_geolocation_prompts_; | 172 std::list<OriginCallback> pending_geolocation_prompts_; |
| 171 | 173 |
| 172 DISALLOW_COPY_AND_ASSIGN(AwContents); | 174 DISALLOW_COPY_AND_ASSIGN(AwContents); |
| 173 }; | 175 }; |
| 174 | 176 |
| 175 bool RegisterAwContents(JNIEnv* env); | 177 bool RegisterAwContents(JNIEnv* env); |
| 176 | 178 |
| 177 } // namespace android_webview | 179 } // namespace android_webview |
| 178 | 180 |
| 179 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 181 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
| OLD | NEW |