| 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 package org.chromium.android_webview; | 5 package org.chromium.android_webview; |
| 6 | 6 |
| 7 import android.graphics.Bitmap; | 7 import android.graphics.Bitmap; |
| 8 import android.graphics.Picture; | 8 import android.graphics.Picture; |
| 9 import android.graphics.Rect; | 9 import android.graphics.Rect; |
| 10 import android.graphics.RectF; | 10 import android.graphics.RectF; |
| 11 import android.os.Handler; | 11 import android.os.Handler; |
| 12 import android.os.Looper; | 12 import android.os.Looper; |
| 13 import android.os.Message; | 13 import android.os.Message; |
| 14 import android.util.Log; | 14 import android.util.Log; |
| 15 import android.view.KeyEvent; | 15 import android.view.KeyEvent; |
| 16 import android.view.View; |
| 16 import android.webkit.ConsoleMessage; | 17 import android.webkit.ConsoleMessage; |
| 17 import android.webkit.GeolocationPermissions; | 18 import android.webkit.GeolocationPermissions; |
| 18 import android.webkit.ValueCallback; | 19 import android.webkit.ValueCallback; |
| 20 import android.webkit.WebChromeClient; |
| 19 | 21 |
| 20 import org.chromium.content.browser.ContentViewClient; | 22 import org.chromium.content.browser.ContentViewClient; |
| 21 import org.chromium.content.browser.ContentViewCore; | 23 import org.chromium.content.browser.ContentViewCore; |
| 22 import org.chromium.content.browser.WebContentsObserverAndroid; | 24 import org.chromium.content.browser.WebContentsObserverAndroid; |
| 23 import org.chromium.net.NetError; | 25 import org.chromium.net.NetError; |
| 24 | 26 |
| 25 /** | 27 /** |
| 26 * Base-class that an AwContents embedder derives from to receive callbacks. | 28 * Base-class that an AwContents embedder derives from to receive callbacks. |
| 27 * This extends ContentViewClient, as in many cases we want to pass-thru Content
ViewCore | 29 * This extends ContentViewClient, as in many cases we want to pass-thru Content
ViewCore |
| 28 * callbacks right to our embedder, and this setup facilities that. | 30 * callbacks right to our embedder, and this setup facilities that. |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 * @param picture New picture. | 277 * @param picture New picture. |
| 276 */ | 278 */ |
| 277 public abstract void onNewPicture(Picture picture); | 279 public abstract void onNewPicture(Picture picture); |
| 278 | 280 |
| 279 public abstract void onPageStarted(String url); | 281 public abstract void onPageStarted(String url); |
| 280 | 282 |
| 281 public abstract void onPageFinished(String url); | 283 public abstract void onPageFinished(String url); |
| 282 | 284 |
| 283 public abstract void onReceivedError(int errorCode, String description, Stri
ng failingUrl); | 285 public abstract void onReceivedError(int errorCode, String description, Stri
ng failingUrl); |
| 284 | 286 |
| 287 public abstract void onShowCustomView(View view, |
| 288 int requestedOrientation, WebChromeClient.CustomViewCallback callback
); |
| 289 |
| 285 //--------------------------------------------------------------------------
------------------ | 290 //--------------------------------------------------------------------------
------------------ |
| 286 // Stuff that we ignore since it only makes sense for Chrome bro
wser | 291 // Stuff that we ignore since it only makes sense for Chrome bro
wser |
| 287 //--------------------------------------------------------------------------
------------------ | 292 //--------------------------------------------------------------------------
------------------ |
| 288 // | 293 // |
| 289 | 294 |
| 290 @Override | 295 @Override |
| 291 final public boolean shouldOverrideScroll(float dx, float dy, float scrollX,
float scrollY) { | 296 final public boolean shouldOverrideScroll(float dx, float dy, float scrollX,
float scrollY) { |
| 292 return false; | 297 return false; |
| 293 } | 298 } |
| 294 | 299 |
| 295 @Override | 300 @Override |
| 296 final public void onContextualActionBarShown() { | 301 final public void onContextualActionBarShown() { |
| 297 } | 302 } |
| 298 | 303 |
| 299 @Override | 304 @Override |
| 300 final public void onContextualActionBarHidden() { | 305 final public void onContextualActionBarHidden() { |
| 301 } | 306 } |
| 302 } | 307 } |
| OLD | NEW |