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.app.ActivityManager; | 7 import android.app.ActivityManager; |
8 import android.content.ComponentCallbacks2; | 8 import android.content.ComponentCallbacks2; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 21 matching lines...) Expand all Loading... |
32 import org.chromium.android_webview.AwContentsClient; | 32 import org.chromium.android_webview.AwContentsClient; |
33 import org.chromium.android_webview.AwContentsStatics; | 33 import org.chromium.android_webview.AwContentsStatics; |
34 import org.chromium.android_webview.AwCookieManager; | 34 import org.chromium.android_webview.AwCookieManager; |
35 import org.chromium.android_webview.AwDataReductionProxyManager; | 35 import org.chromium.android_webview.AwDataReductionProxyManager; |
36 import org.chromium.android_webview.AwDevToolsServer; | 36 import org.chromium.android_webview.AwDevToolsServer; |
37 import org.chromium.android_webview.AwQuotaManagerBridge; | 37 import org.chromium.android_webview.AwQuotaManagerBridge; |
38 import org.chromium.android_webview.AwResource; | 38 import org.chromium.android_webview.AwResource; |
39 import org.chromium.android_webview.AwSettings; | 39 import org.chromium.android_webview.AwSettings; |
40 import org.chromium.android_webview.R; | 40 import org.chromium.android_webview.R; |
41 import org.chromium.base.CommandLine; | 41 import org.chromium.base.CommandLine; |
| 42 import org.chromium.base.ContextUtils; |
42 import org.chromium.base.MemoryPressureListener; | 43 import org.chromium.base.MemoryPressureListener; |
43 import org.chromium.base.PathService; | 44 import org.chromium.base.PathService; |
44 import org.chromium.base.PathUtils; | 45 import org.chromium.base.PathUtils; |
45 import org.chromium.base.ThreadUtils; | 46 import org.chromium.base.ThreadUtils; |
46 import org.chromium.base.TraceEvent; | 47 import org.chromium.base.TraceEvent; |
47 import org.chromium.base.annotations.SuppressFBWarnings; | 48 import org.chromium.base.annotations.SuppressFBWarnings; |
48 import org.chromium.base.library_loader.LibraryLoader; | 49 import org.chromium.base.library_loader.LibraryLoader; |
49 import org.chromium.base.library_loader.LibraryProcessType; | 50 import org.chromium.base.library_loader.LibraryProcessType; |
50 import org.chromium.base.library_loader.ProcessInitException; | 51 import org.chromium.base.library_loader.ProcessInitException; |
51 import org.chromium.content.app.ContentMain; | |
52 import org.chromium.content.browser.ContentViewStatics; | 52 import org.chromium.content.browser.ContentViewStatics; |
53 import org.chromium.ui.base.ResourceBundle; | 53 import org.chromium.ui.base.ResourceBundle; |
54 | 54 |
55 import java.io.File; | 55 import java.io.File; |
56 import java.lang.ref.WeakReference; | 56 import java.lang.ref.WeakReference; |
57 import java.util.ArrayList; | 57 import java.util.ArrayList; |
58 | 58 |
59 /** | 59 /** |
60 * Entry point to the WebView. The system framework talks to this class to get i
nstances of the | 60 * Entry point to the WebView. The system framework talks to this class to get i
nstances of the |
61 * implementation classes. | 61 * implementation classes. |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 416 |
417 @Override | 417 @Override |
418 public CookieManager getCookieManager() { | 418 public CookieManager getCookieManager() { |
419 synchronized (mLock) { | 419 synchronized (mLock) { |
420 if (mCookieManager == null) { | 420 if (mCookieManager == null) { |
421 if (!mStarted) { | 421 if (!mStarted) { |
422 // We can use CookieManager without starting Chromium; the n
ative code | 422 // We can use CookieManager without starting Chromium; the n
ative code |
423 // will bring up just the parts it needs to make this work o
n a temporary | 423 // will bring up just the parts it needs to make this work o
n a temporary |
424 // basis until Chromium is started for real. The temporary c
ookie manager | 424 // basis until Chromium is started for real. The temporary c
ookie manager |
425 // needs the application context to have been set. | 425 // needs the application context to have been set. |
426 ContentMain.initApplicationContext(getWrappedCurrentApplicat
ionContext()); | 426 ContextUtils.initApplicationContext(getWrappedCurrentApplica
tionContext()); |
427 } | 427 } |
428 mCookieManager = new CookieManagerAdapter(new AwCookieManager())
; | 428 mCookieManager = new CookieManagerAdapter(new AwCookieManager())
; |
429 } | 429 } |
430 } | 430 } |
431 return mCookieManager; | 431 return mCookieManager; |
432 } | 432 } |
433 | 433 |
434 @Override | 434 @Override |
435 public android.webkit.WebIconDatabase getWebIconDatabase() { | 435 public android.webkit.WebIconDatabase getWebIconDatabase() { |
436 synchronized (mLock) { | 436 synchronized (mLock) { |
(...skipping 26 matching lines...) Expand all Loading... |
463 browserContext.getHttpAuthDatabase(context)); | 463 browserContext.getHttpAuthDatabase(context)); |
464 } | 464 } |
465 } | 465 } |
466 return mWebViewDatabase; | 466 return mWebViewDatabase; |
467 } | 467 } |
468 | 468 |
469 WebViewDelegate getWebViewDelegate() { | 469 WebViewDelegate getWebViewDelegate() { |
470 return mWebViewDelegate; | 470 return mWebViewDelegate; |
471 } | 471 } |
472 } | 472 } |
OLD | NEW |