webview-plus:在任何Android 4.x设备上的统一Webview

  • Q8_758632
    了解作者
  • 108.1MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-15 08:58
    上传日期
重要说明:该项目已终止。 有关适用于Android的最新Webview +,请访问位于的新Cocoon Cloud。 新的Cocoon云完全基于Cordova,并具有增强的功能,其中包括:最新的Webview +,新的Cocoon插件,更好的Developer App,对所有Cordova插件的支持以及经过改进的UI。 适用于Android的Webview + 该项目是cordova / phonegap应用程序的插件,并在任何Android 4.x设备上提供统一的Webview 。 。 寻找吗? Webview +的功能,优势和优势 V8 Javascript VM 适用于Android 4.x 最新HTML5 API 与Cordova插件兼容 比系统Webview更好的性能 先决条件 您需要在SDK工具中安装级别19。 如何在当前项目中安装Webview + 即使它是与c
webview-plus-master.zip
内容介绍
// Copyright 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.content.browser; import android.annotation.SuppressLint; import android.app.Activity; import android.app.SearchManager; import android.content.ContentResolver; import android.content.Context; import android.content.Intent; import android.content.pm.FeatureInfo; import android.content.pm.PackageManager; import android.content.res.Configuration; import android.database.ContentObserver; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Rect; import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.ResultReceiver; import android.os.SystemClock; import android.provider.Browser; import android.provider.Settings; import android.text.Editable; import android.text.Selection; import android.text.TextUtils; import android.util.Log; import android.view.ActionMode; import android.view.HapticFeedbackConstants; import android.view.InputDevice; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityManager.AccessibilityStateChangeListener; import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityNodeProvider; import android.view.inputmethod.EditorInfo; import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.widget.FrameLayout; import com.google.common.annotations.VisibleForTesting; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.CalledByNative; import org.chromium.base.CommandLine; import org.chromium.base.JNINamespace; import org.chromium.base.ObserverList; import org.chromium.base.ObserverList.RewindableIterator; import org.chromium.base.TraceEvent; import org.chromium.content.R; import org.chromium.content.browser.ScreenOrientationListener.ScreenOrientationObserver; import org.chromium.content.browser.accessibility.AccessibilityInjector; import org.chromium.content.browser.accessibility.BrowserAccessibilityManager; import org.chromium.content.browser.input.AdapterInputConnection; import org.chromium.content.browser.input.GamepadList; import org.chromium.content.browser.input.HandleView; import org.chromium.content.browser.input.ImeAdapter; import org.chromium.content.browser.input.ImeAdapter.AdapterInputConnectionFactory; import org.chromium.content.browser.input.InputMethodManagerWrapper; import org.chromium.content.browser.input.InsertionHandleController; import org.chromium.content.browser.input.SelectPopup; import org.chromium.content.browser.input.SelectPopupDialog; import org.chromium.content.browser.input.SelectPopupDropdown; import org.chromium.content.browser.input.SelectPopupItem; import org.chromium.content.browser.input.SelectionHandleController; import org.chromium.content.common.ContentSwitches; import org.chromium.content_public.browser.GestureStateListener; import org.chromium.content_public.browser.WebContents; import org.chromium.ui.base.ViewAndroid; import org.chromium.ui.base.ViewAndroidDelegate; import org.chromium.ui.base.WindowAndroid; import org.chromium.ui.gfx.DeviceDisplayInfo; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; /** * Provides a Java-side 'wrapper' around a WebContent (native) instance. * Contains all the major functionality necessary to manage the lifecycle of a ContentView without * being tied to the view system. */ @JNINamespace("content") public class ContentViewCore implements NavigationClient, AccessibilityStateChangeListener, ScreenOrientationObserver { private static final String TAG = "ContentViewCore"; // Used to avoid enabling zooming in / out if resulting zooming will // produce little visible difference. private static final float ZOOM_CONTROLS_EPSILON = 0.007f; // Used to represent gestures for long press and long tap. private static final int IS_LONG_PRESS = 1; private static final int IS_LONG_TAP = 2; // Length of the delay (in ms) before fading in handles after the last page movement. private static final int TEXT_HANDLE_FADE_IN_DELAY = 300; // These values are obtained from Samsung. // TODO(changwan): refactor SPen related code into a separate class. See // http://crbug.com/398169. private static final int SPEN_ACTION_DOWN = 211; private static final int SPEN_ACTION_UP = 212; private static final int SPEN_ACTION_MOVE = 213; private static final int SPEN_ACTION_CANCEL = 214; private static Boolean sIsSPenSupported; // If the embedder adds a JavaScript interface object that contains an indirect reference to // the ContentViewCore, then storing a strong ref to the interface object on the native // side would prevent garbage collection of the ContentViewCore (as that strong ref would // create a new GC root). // For that reason, we store only a weak reference to the interface object on the // native side. However we still need a strong reference on the Java side to // prevent garbage collection if the embedder doesn't maintain their own ref to the // interface object - the Java side ref won't create a new GC root. // This map stores those refernces. We put into the map on addJavaScriptInterface() // and remove from it in removeJavaScriptInterface(). private final Map<String, Object> mJavaScriptInterfaces = new HashMap<String, Object>(); // Additionally, we keep track of all Java bound JS objects that are in use on the // current page to ensure that they are not garbage collected until the page is // navigated. This includes interface objects that have been removed // via the removeJavaScriptInterface API and transient objects returned from methods // on the interface object. Note we use HashSet rather than Set as the native side // expects HashSet (no bindings for interfaces). private final HashSet<Object> mRetainedJavaScriptObjects = new HashSet<Object>(); /** * Interface that consumers of {@link ContentViewCore} must implement to allow the proper * dispatching of view methods through the containing view. * * <p> * All methods with the "super_" prefix should be routed to the parent of the * implementing container view. */ @SuppressWarnings("javadoc") public interface InternalAccessDelegate { /** * @see View#drawChild(Canvas, View, long) */ boolean drawChild(Canvas canvas, View child, long drawingTime); /** * @see View#onKeyUp(keyCode, KeyEvent) */ boolean super_onKeyUp(int keyCode, KeyEvent event); /** * @see View#dispatchKeyEventPreIme(KeyEvent) */ boolean super_dispatchKeyEventPreIme(KeyEvent event); /** * @see View#dispatchKeyEvent(KeyEvent) */ boolean super_dispatchKeyEvent(KeyEvent event); /** * @see View#onGenericMotionEvent(MotionEvent) */ boolean super_onGenericMotionEvent(MotionEvent event); /** * @see View#onConfigurationChanged(Configuration) */ void super_onConfigurationChanged(Configuration newConfig); /** * @see View#onScrollChanged(int, int, int, int) */ void onScrollChanged(int lPix, int tPix, int oldlPix, int oldtPix); /** * @see View#awakenScrollBars() */ boolean awakenScrollBars(); /**
评论
    相关推荐
    • cordova
      Apache Cordova是使用标准Web技术(HTML,CSS和JavaScript)创建跨平台应用程序的工具。 其主要目的是为本地设备API访问提供桥梁,并捆绑分发。https://mirrors.tuna.tsinghua.edu.cn/apache/cordova/platforms/
    • cordova
      Apache Cordova是使用标准Web技术(HTML,CSS和JavaScript)创建跨平台应用程序的工具。 其主要目的是为本地设备API访问提供桥梁,并捆绑分发。https://mirrors.tuna.tsinghua.edu.cn/apache/cordova/platforms/
    • cordova 支付宝支付插件
      cordova 支付宝 插件,用于HTML5开放时使用支付宝支付的插件
    • cordova
      Apache Cordova是使用标准Web技术(HTML,CSS和JavaScript)创建跨平台应用程序的工具。 其主要目的是为本地设备API访问提供桥梁,并捆绑分发。https://mirrors.tuna.tsinghua.edu.cn/apache/cordova/platforms/
    • cordova
      Apache Cordova是使用标准Web技术(HTML,CSS和JavaScript)创建跨平台应用程序的工具。 其主要目的是为本地设备API访问提供桥梁,并捆绑分发。https://mirrors.tuna.tsinghua.edu.cn/apache/cordova/platforms/
    • cordova
      Apache Cordova是使用标准Web技术(HTML,CSS和JavaScript)创建跨平台应用程序的工具。 其主要目的是为本地设备API访问提供桥梁,并捆绑分发。https://mirrors.tuna.tsinghua.edu.cn/apache/cordova/platforms/
    • cordova
      Apache Cordova是使用标准Web技术(HTML,CSS和JavaScript)创建跨平台应用程序的工具。 其主要目的是为本地设备API访问提供桥梁,并捆绑分发。https://mirrors.tuna.tsinghua.edu.cn/apache/cordova/platforms/
    • Cordova示例
      使用Cordova实现的简单示例,通过主界面让显示html页面的view弹出来
    • cordova+html5=android app
      cordova+html5=android app事例
    • cordova-chennai
      HTML5 应用程序- v2