| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.app.Activity; | 8 import android.app.Activity; |
| 9 import android.content.ActivityNotFoundException; | 9 import android.content.ActivityNotFoundException; |
| 10 import android.content.Context; | 10 import android.content.Context; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 import android.view.View; | 21 import android.view.View; |
| 22 import android.webkit.ConsoleMessage; | 22 import android.webkit.ConsoleMessage; |
| 23 import android.webkit.GeolocationPermissions; | 23 import android.webkit.GeolocationPermissions; |
| 24 import android.webkit.ValueCallback; | 24 import android.webkit.ValueCallback; |
| 25 import android.webkit.WebChromeClient; | 25 import android.webkit.WebChromeClient; |
| 26 | 26 |
| 27 import org.chromium.android_webview.permission.AwPermissionRequest; | 27 import org.chromium.android_webview.permission.AwPermissionRequest; |
| 28 import org.chromium.base.Log; | 28 import org.chromium.base.Log; |
| 29 import org.chromium.base.annotations.SuppressFBWarnings; | 29 import org.chromium.base.annotations.SuppressFBWarnings; |
| 30 import org.chromium.content.browser.ContentViewCore; | 30 import org.chromium.content.browser.ContentViewCore; |
| 31 import org.chromium.content.browser.SelectActionMode; | 31 import org.chromium.content.browser.WebActionMode; |
| 32 import org.chromium.content.browser.SelectActionModeCallback.ActionHandler; | 32 import org.chromium.content.browser.WebActionModeCallback.ActionHandler; |
| 33 | 33 |
| 34 import java.security.Principal; | 34 import java.security.Principal; |
| 35 import java.util.HashMap; | 35 import java.util.HashMap; |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Base-class that an AwContents embedder derives from to receive callbacks. | 38 * Base-class that an AwContents embedder derives from to receive callbacks. |
| 39 * This extends ContentViewClient, as in many cases we want to pass-thru Content
ViewCore | 39 * This extends ContentViewClient, as in many cases we want to pass-thru Content
ViewCore |
| 40 * callbacks right to our embedder, and this setup facilities that. | 40 * callbacks right to our embedder, and this setup facilities that. |
| 41 * For any other callbacks we need to make transformations of (e.g. adapt parame
ters | 41 * For any other callbacks we need to make transformations of (e.g. adapt parame
ters |
| 42 * or perform filtering) we can provide final overrides for methods here, and th
en introduce | 42 * or perform filtering) we can provide final overrides for methods here, and th
en introduce |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 // | 366 // |
| 367 public abstract void onFindResultReceived(int activeMatchOrdinal, int number
OfMatches, | 367 public abstract void onFindResultReceived(int activeMatchOrdinal, int number
OfMatches, |
| 368 boolean isDoneCounting); | 368 boolean isDoneCounting); |
| 369 | 369 |
| 370 /** | 370 /** |
| 371 * Called whenever there is a new content picture available. | 371 * Called whenever there is a new content picture available. |
| 372 * @param picture New picture. | 372 * @param picture New picture. |
| 373 */ | 373 */ |
| 374 public abstract void onNewPicture(Picture picture); | 374 public abstract void onNewPicture(Picture picture); |
| 375 | 375 |
| 376 public abstract SelectActionMode startActionMode( | 376 public abstract WebActionMode startActionMode( |
| 377 View view, ActionHandler actionHandler, boolean floating); | 377 View view, ActionHandler actionHandler, boolean floating); |
| 378 | 378 |
| 379 public abstract boolean supportsFloatingActionMode(); | 379 public abstract boolean supportsFloatingActionMode(); |
| 380 | 380 |
| 381 public void updateTitle(String title, boolean forceNotification) { | 381 public void updateTitle(String title, boolean forceNotification) { |
| 382 if (!forceNotification && TextUtils.equals(mTitle, title)) return; | 382 if (!forceNotification && TextUtils.equals(mTitle, title)) return; |
| 383 mTitle = title; | 383 mTitle = title; |
| 384 mCallbackHelper.postOnReceivedTitle(mTitle); | 384 mCallbackHelper.postOnReceivedTitle(mTitle); |
| 385 } | 385 } |
| 386 } | 386 } |
| OLD | NEW |