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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 | 152 |
153 // BrowserViewRenderer::Client implementation. | 153 // BrowserViewRenderer::Client implementation. |
154 virtual void Invalidate() OVERRIDE; | 154 virtual void Invalidate() OVERRIDE; |
155 virtual void OnNewPicture( | 155 virtual void OnNewPicture( |
156 const base::android::JavaRef<jobject>& picture) OVERRIDE; | 156 const base::android::JavaRef<jobject>& picture) OVERRIDE; |
157 | 157 |
158 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); | 158 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); |
159 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); | 159 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); |
160 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); | 160 jint ReleasePopupWebContents(JNIEnv* env, jobject obj); |
161 | 161 |
| 162 void ResetScrollAndScaleState(JNIEnv* env, jobject obj); |
| 163 |
162 private: | 164 private: |
163 void SetWebContents(content::WebContents* web_contents); | 165 void SetWebContents(content::WebContents* web_contents); |
164 | 166 |
165 JavaObjectWeakGlobalRef java_ref_; | 167 JavaObjectWeakGlobalRef java_ref_; |
166 scoped_ptr<content::WebContents> web_contents_; | 168 scoped_ptr<content::WebContents> web_contents_; |
167 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; | 169 scoped_ptr<AwWebContentsDelegate> web_contents_delegate_; |
168 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; | 170 scoped_ptr<AwRenderViewHostExt> render_view_host_ext_; |
169 scoped_ptr<FindHelper> find_helper_; | 171 scoped_ptr<FindHelper> find_helper_; |
170 scoped_ptr<IconHelper> icon_helper_; | 172 scoped_ptr<IconHelper> icon_helper_; |
171 scoped_ptr<content::WebContents> pending_contents_; | 173 scoped_ptr<content::WebContents> pending_contents_; |
172 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; | 174 scoped_ptr<BrowserViewRenderer> browser_view_renderer_; |
173 | 175 |
174 // GURL is supplied by the content layer as requesting frame. | 176 // GURL is supplied by the content layer as requesting frame. |
175 // Callback is supplied by the content layer, and is invoked with the result | 177 // Callback is supplied by the content layer, and is invoked with the result |
176 // from the permission prompt. | 178 // from the permission prompt. |
177 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; | 179 typedef std::pair<const GURL, base::Callback<void(bool)> > OriginCallback; |
178 // The first element in the list is always the currently pending request. | 180 // The first element in the list is always the currently pending request. |
179 std::list<OriginCallback> pending_geolocation_prompts_; | 181 std::list<OriginCallback> pending_geolocation_prompts_; |
180 | 182 |
181 DISALLOW_COPY_AND_ASSIGN(AwContents); | 183 DISALLOW_COPY_AND_ASSIGN(AwContents); |
182 }; | 184 }; |
183 | 185 |
184 bool RegisterAwContents(JNIEnv* env); | 186 bool RegisterAwContents(JNIEnv* env); |
185 | 187 |
186 } // namespace android_webview | 188 } // namespace android_webview |
187 | 189 |
188 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 190 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |