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