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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 jstring url, jstring extra_headers); | 129 jstring url, jstring extra_headers); |
130 | 130 |
131 void DrawGL(AwDrawGLInfo* draw_info); | 131 void DrawGL(AwDrawGLInfo* draw_info); |
132 | 132 |
133 void InvokeGeolocationCallback(JNIEnv* env, | 133 void InvokeGeolocationCallback(JNIEnv* env, |
134 jobject obj, | 134 jobject obj, |
135 jboolean value, | 135 jboolean value, |
136 jstring origin); | 136 jstring origin); |
137 | 137 |
138 // PermissionRequestHandlerClient implementation. | 138 // PermissionRequestHandlerClient implementation. |
139 virtual void OnPermissionRequest(AwPermissionRequest* request) OVERRIDE; | 139 virtual void OnPermissionRequest(AwPermissionRequest* request) override; |
140 virtual void OnPermissionRequestCanceled( | 140 virtual void OnPermissionRequestCanceled( |
141 AwPermissionRequest* request) OVERRIDE; | 141 AwPermissionRequest* request) override; |
142 | 142 |
143 PermissionRequestHandler* GetPermissionRequestHandler() { | 143 PermissionRequestHandler* GetPermissionRequestHandler() { |
144 return permission_request_handler_.get(); | 144 return permission_request_handler_.get(); |
145 } | 145 } |
146 | 146 |
147 void PreauthorizePermission(JNIEnv* env, | 147 void PreauthorizePermission(JNIEnv* env, |
148 jobject obj, | 148 jobject obj, |
149 jstring origin, | 149 jstring origin, |
150 jlong resources); | 150 jlong resources); |
151 | 151 |
152 // AwBrowserPermissionRequestDelegate implementation. | 152 // AwBrowserPermissionRequestDelegate implementation. |
153 virtual void RequestProtectedMediaIdentifierPermission( | 153 virtual void RequestProtectedMediaIdentifierPermission( |
154 const GURL& origin, | 154 const GURL& origin, |
155 const base::Callback<void(bool)>& callback) OVERRIDE; | 155 const base::Callback<void(bool)>& callback) override; |
156 virtual void CancelProtectedMediaIdentifierPermissionRequests( | 156 virtual void CancelProtectedMediaIdentifierPermissionRequests( |
157 const GURL& origin) OVERRIDE; | 157 const GURL& origin) override; |
158 virtual void RequestGeolocationPermission( | 158 virtual void RequestGeolocationPermission( |
159 const GURL& origin, | 159 const GURL& origin, |
160 const base::Callback<void(bool)>& callback) OVERRIDE; | 160 const base::Callback<void(bool)>& callback) override; |
161 virtual void CancelGeolocationPermissionRequests( | 161 virtual void CancelGeolocationPermissionRequests( |
162 const GURL& origin) OVERRIDE; | 162 const GURL& origin) override; |
163 | 163 |
164 | 164 |
165 // Find-in-page API and related methods. | 165 // Find-in-page API and related methods. |
166 void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string); | 166 void FindAllAsync(JNIEnv* env, jobject obj, jstring search_string); |
167 void FindNext(JNIEnv* env, jobject obj, jboolean forward); | 167 void FindNext(JNIEnv* env, jobject obj, jboolean forward); |
168 void ClearMatches(JNIEnv* env, jobject obj); | 168 void ClearMatches(JNIEnv* env, jobject obj); |
169 FindHelper* GetFindHelper(); | 169 FindHelper* GetFindHelper(); |
170 | 170 |
171 // Per WebView Cookie Policy | 171 // Per WebView Cookie Policy |
172 bool AllowThirdPartyCookies(); | 172 bool AllowThirdPartyCookies(); |
173 | 173 |
174 // FindHelper::Listener implementation. | 174 // FindHelper::Listener implementation. |
175 virtual void OnFindResultReceived(int active_ordinal, | 175 virtual void OnFindResultReceived(int active_ordinal, |
176 int match_count, | 176 int match_count, |
177 bool finished) OVERRIDE; | 177 bool finished) override; |
178 // IconHelper::Listener implementation. | 178 // IconHelper::Listener implementation. |
179 virtual bool ShouldDownloadFavicon(const GURL& icon_url) OVERRIDE; | 179 virtual bool ShouldDownloadFavicon(const GURL& icon_url) override; |
180 virtual void OnReceivedIcon(const GURL& icon_url, | 180 virtual void OnReceivedIcon(const GURL& icon_url, |
181 const SkBitmap& bitmap) OVERRIDE; | 181 const SkBitmap& bitmap) override; |
182 virtual void OnReceivedTouchIconUrl(const std::string& url, | 182 virtual void OnReceivedTouchIconUrl(const std::string& url, |
183 const bool precomposed) OVERRIDE; | 183 const bool precomposed) override; |
184 | 184 |
185 // AwRenderViewHostExtClient implementation. | 185 // AwRenderViewHostExtClient implementation. |
186 virtual void OnWebLayoutPageScaleFactorChanged( | 186 virtual void OnWebLayoutPageScaleFactorChanged( |
187 float page_scale_factor) OVERRIDE; | 187 float page_scale_factor) override; |
188 virtual void OnWebLayoutContentsSizeChanged( | 188 virtual void OnWebLayoutContentsSizeChanged( |
189 const gfx::Size& contents_size) OVERRIDE; | 189 const gfx::Size& contents_size) override; |
190 | 190 |
191 // BrowserViewRendererClient implementation. | 191 // BrowserViewRendererClient implementation. |
192 virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) OVERRIDE; | 192 virtual bool RequestDrawGL(jobject canvas, bool wait_for_completion) override; |
193 virtual void PostInvalidate() OVERRIDE; | 193 virtual void PostInvalidate() override; |
194 virtual void UpdateParentDrawConstraints() OVERRIDE; | 194 virtual void UpdateParentDrawConstraints() override; |
195 virtual void OnNewPicture() OVERRIDE; | 195 virtual void OnNewPicture() override; |
196 virtual gfx::Point GetLocationOnScreen() OVERRIDE; | 196 virtual gfx::Point GetLocationOnScreen() override; |
197 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) OVERRIDE; | 197 virtual void ScrollContainerViewTo(gfx::Vector2d new_value) override; |
198 virtual bool IsFlingActive() const OVERRIDE; | 198 virtual bool IsFlingActive() const override; |
199 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, | 199 virtual void UpdateScrollState(gfx::Vector2d max_scroll_offset, |
200 gfx::SizeF contents_size_dip, | 200 gfx::SizeF contents_size_dip, |
201 float page_scale_factor, | 201 float page_scale_factor, |
202 float min_page_scale_factor, | 202 float min_page_scale_factor, |
203 float max_page_scale_factor) OVERRIDE; | 203 float max_page_scale_factor) override; |
204 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) OVERRIDE; | 204 virtual void DidOverscroll(gfx::Vector2d overscroll_delta) override; |
205 | 205 |
206 const BrowserViewRenderer* GetBrowserViewRenderer() const; | 206 const BrowserViewRenderer* GetBrowserViewRenderer() const; |
207 | 207 |
208 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); | 208 void ClearCache(JNIEnv* env, jobject obj, jboolean include_disk_files); |
209 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); | 209 void SetPendingWebContentsForPopup(scoped_ptr<content::WebContents> pending); |
210 jlong ReleasePopupAwContents(JNIEnv* env, jobject obj); | 210 jlong ReleasePopupAwContents(JNIEnv* env, jobject obj); |
211 | 211 |
212 void ScrollTo(JNIEnv* env, jobject obj, jint x, jint y); | 212 void ScrollTo(JNIEnv* env, jobject obj, jint x, jint y); |
213 void SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale); | 213 void SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale); |
214 void SetSaveFormData(bool enabled); | 214 void SetSaveFormData(bool enabled); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 GLViewRendererManager::Key renderer_manager_key_; | 255 GLViewRendererManager::Key renderer_manager_key_; |
256 | 256 |
257 DISALLOW_COPY_AND_ASSIGN(AwContents); | 257 DISALLOW_COPY_AND_ASSIGN(AwContents); |
258 }; | 258 }; |
259 | 259 |
260 bool RegisterAwContents(JNIEnv* env); | 260 bool RegisterAwContents(JNIEnv* env); |
261 | 261 |
262 } // namespace android_webview | 262 } // namespace android_webview |
263 | 263 |
264 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ | 264 #endif // ANDROID_WEBVIEW_NATIVE_AW_CONTENTS_H_ |
OLD | NEW |