| 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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 void ScrollTo(JNIEnv* env, jobject obj, jint xPix, jint yPix); | 166 void ScrollTo(JNIEnv* env, jobject obj, jint xPix, jint yPix); |
| 167 void SetDipScale(JNIEnv* env, jobject obj, jfloat dipScale); | 167 void SetDipScale(JNIEnv* env, jobject obj, jfloat dipScale); |
| 168 void SetDisplayedPageScaleFactor(JNIEnv* env, | 168 void SetDisplayedPageScaleFactor(JNIEnv* env, |
| 169 jobject obj, | 169 jobject obj, |
| 170 jfloat pageScaleFactor); | 170 jfloat pageScaleFactor); |
| 171 | 171 |
| 172 void SetSaveFormData(bool enabled); | 172 void SetSaveFormData(bool enabled); |
| 173 | 173 |
| 174 // Sets the java delegate | 174 // Sets the java delegate |
| 175 void SetAwAutofillManagerDelegate(jobject delegate); | 175 void SetAwAutofillManagerDelegate(jobject delegate); |
| 176 |
| 177 void SetJsOnlineProperty(JNIEnv* env, jobject obj, jboolean network_up); |
| 178 |
| 176 private: | 179 private: |
| 177 void InitAutofillIfNecessary(bool enabled); | 180 void InitAutofillIfNecessary(bool enabled); |
| 178 | 181 |
| 179 JavaObjectWeakGlobalRef java_ref_; | 182 JavaObjectWeakGlobalRef java_ref_; |
| 180 scoped_ptr<content::WebContents> web_contents_; | 183 scoped_ptr<content::WebContents> web_contents_; |
| 181 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 184 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
| 182 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; | 185 scoped_ptr<AwContentsClientBridge> contents_client_bridge_; |
| 183 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 186 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
| 184 scoped_ptr<FindHelper> find_helper_; | 187 scoped_ptr<FindHelper> find_helper_; |
| 185 scoped_ptr<IconHelper> icon_helper_; | 188 scoped_ptr<IconHelper> icon_helper_; |
| 186 scoped_ptr<AwContents> pending_contents_; | 189 scoped_ptr<AwContents> pending_contents_; |
| 187 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; | 190 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; |
| 188 | 191 |
| 189 // GURL is supplied by the content layer as requesting frame. | 192 // GURL is supplied by the content layer as requesting frame. |
| 190 // Callback is supplied by the content layer, and is invoked with the result | 193 // Callback is supplied by the content layer, and is invoked with the result |
| 191 // from the permission prompt. | 194 // from the permission prompt. |
| 192 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 195 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
| 193 // The first element in the list is always the currently pending request. | 196 // The first element in the list is always the currently pending request. |
| 194 std::list<OriginCallback> pending_geolocation_prompts_; | 197 std::list<OriginCallback> pending_geolocation_prompts_; |
| 195 | 198 |
| 196 DISALLOW_COPY_AND_ASSIGN(AwContents); | 199 DISALLOW_COPY_AND_ASSIGN(AwContents); |
| 197 }; | 200 }; |
| 198 | 201 |
| 199 bool RegisterAwContents(JNIEnv* env); | 202 bool RegisterAwContents(JNIEnv* env); |
| 200 | 203 |
| 201 } // namespace android_webview | 204 } // namespace android_webview |
| 202 | 205 |
| 203 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 206 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
| OLD | NEW |