OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 com.android.webview.chromium; | 5 package com.android.webview.chromium; |
6 | 6 |
7 import android.Manifest; | 7 import android.Manifest; |
8 import android.app.ActivityManager; | 8 import android.app.ActivityManager; |
9 import android.content.ComponentCallbacks2; | 9 import android.content.ComponentCallbacks2; |
10 import android.content.Context; | 10 import android.content.Context; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 import org.chromium.base.MemoryPressureListener; | 56 import org.chromium.base.MemoryPressureListener; |
57 import org.chromium.base.PackageUtils; | 57 import org.chromium.base.PackageUtils; |
58 import org.chromium.base.PathService; | 58 import org.chromium.base.PathService; |
59 import org.chromium.base.PathUtils; | 59 import org.chromium.base.PathUtils; |
60 import org.chromium.base.ThreadUtils; | 60 import org.chromium.base.ThreadUtils; |
61 import org.chromium.base.TraceEvent; | 61 import org.chromium.base.TraceEvent; |
62 import org.chromium.base.library_loader.LibraryLoader; | 62 import org.chromium.base.library_loader.LibraryLoader; |
63 import org.chromium.base.library_loader.LibraryProcessType; | 63 import org.chromium.base.library_loader.LibraryProcessType; |
64 import org.chromium.base.library_loader.NativeLibraries; | 64 import org.chromium.base.library_loader.NativeLibraries; |
65 import org.chromium.base.library_loader.ProcessInitException; | 65 import org.chromium.base.library_loader.ProcessInitException; |
66 import org.chromium.content.browser.ContentViewStatics; | |
67 import org.chromium.content.browser.input.LGEmailActionModeWorkaround; | 66 import org.chromium.content.browser.input.LGEmailActionModeWorkaround; |
68 import org.chromium.net.NetworkChangeNotifier; | 67 import org.chromium.net.NetworkChangeNotifier; |
69 | 68 |
70 import java.io.File; | 69 import java.io.File; |
71 import java.util.Queue; | 70 import java.util.Queue; |
72 import java.util.concurrent.Callable; | 71 import java.util.concurrent.Callable; |
73 import java.util.concurrent.ConcurrentLinkedQueue; | 72 import java.util.concurrent.ConcurrentLinkedQueue; |
74 import java.util.concurrent.FutureTask; | 73 import java.util.concurrent.FutureTask; |
75 import java.util.concurrent.TimeUnit; | 74 import java.util.concurrent.TimeUnit; |
76 | 75 |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
517 public Statics getStatics() { | 516 public Statics getStatics() { |
518 synchronized (mLock) { | 517 synchronized (mLock) { |
519 if (mStaticMethods == null) { | 518 if (mStaticMethods == null) { |
520 // TODO: Optimization potential: most these methods only need th
e native library | 519 // TODO: Optimization potential: most these methods only need th
e native library |
521 // loaded and initialized, not the entire browser process starte
d. | 520 // loaded and initialized, not the entire browser process starte
d. |
522 // See also http://b/7009882 | 521 // See also http://b/7009882 |
523 ensureChromiumStartedLocked(true); | 522 ensureChromiumStartedLocked(true); |
524 mStaticMethods = new WebViewFactoryProvider.Statics() { | 523 mStaticMethods = new WebViewFactoryProvider.Statics() { |
525 @Override | 524 @Override |
526 public String findAddress(String addr) { | 525 public String findAddress(String addr) { |
527 return ContentViewStatics.findAddress(addr); | 526 return AwContentsStatics.findAddress(addr); |
528 } | 527 } |
529 | 528 |
530 @Override | 529 @Override |
531 public String getDefaultUserAgent(Context context) { | 530 public String getDefaultUserAgent(Context context) { |
532 return AwSettings.getDefaultUserAgent(); | 531 return AwSettings.getDefaultUserAgent(); |
533 } | 532 } |
534 | 533 |
535 @Override | 534 @Override |
536 public void setWebContentsDebuggingEnabled(boolean enable) { | 535 public void setWebContentsDebuggingEnabled(boolean enable) { |
537 // Web Contents debugging is always enabled on debug bui
lds. | 536 // Web Contents debugging is always enabled on debug bui
lds. |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 WebViewDelegate getWebViewDelegate() { | 692 WebViewDelegate getWebViewDelegate() { |
694 return mWebViewDelegate; | 693 return mWebViewDelegate; |
695 } | 694 } |
696 | 695 |
697 // The method to support unreleased Android. | 696 // The method to support unreleased Android. |
698 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV
iew, | 697 WebViewContentsClientAdapter createWebViewContentsClientAdapter(WebView webV
iew, |
699 Context context) { | 698 Context context) { |
700 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega
te); | 699 return new WebViewContentsClientAdapter(webView, context, mWebViewDelega
te); |
701 } | 700 } |
702 } | 701 } |
OLD | NEW |