| 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 } | 321 } |
| 322 mDevToolsServer.setRemoteDebuggingEnabled(enable); | 322 mDevToolsServer.setRemoteDebuggingEnabled(enable); |
| 323 } | 323 } |
| 324 | 324 |
| 325 private void setUpResources(Context context) { | 325 private void setUpResources(Context context) { |
| 326 final String packageName = WebViewFactory.getLoadedPackageInfo().package
Name; | 326 final String packageName = WebViewFactory.getLoadedPackageInfo().package
Name; |
| 327 ResourceRewriter.rewriteRValues( | 327 ResourceRewriter.rewriteRValues( |
| 328 mWebViewDelegate.getPackageId(context.getResources(), packageNam
e)); | 328 mWebViewDelegate.getPackageId(context.getResources(), packageNam
e)); |
| 329 | 329 |
| 330 AwResource.setResources(context.getResources()); | 330 AwResource.setResources(context.getResources()); |
| 331 AwResource.setErrorPageResources(android.R.raw.loaderror, android.R.raw.
nodomain); | |
| 332 AwResource.setConfigKeySystemUuidMapping(android.R.array.config_keySyste
mUuidMapping); | 331 AwResource.setConfigKeySystemUuidMapping(android.R.array.config_keySyste
mUuidMapping); |
| 333 } | 332 } |
| 334 | 333 |
| 335 @Override | 334 @Override |
| 336 public Statics getStatics() { | 335 public Statics getStatics() { |
| 337 synchronized (mLock) { | 336 synchronized (mLock) { |
| 338 if (mStaticMethods == null) { | 337 if (mStaticMethods == null) { |
| 339 // TODO: Optimization potential: most these methods only need th
e native library | 338 // TODO: Optimization potential: most these methods only need th
e native library |
| 340 // loaded and initialized, not the entire browser process starte
d. | 339 // loaded and initialized, not the entire browser process starte
d. |
| 341 // See also http://b/7009882 | 340 // See also http://b/7009882 |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 browserContext.getHttpAuthDatabase(context)); | 462 browserContext.getHttpAuthDatabase(context)); |
| 464 } | 463 } |
| 465 } | 464 } |
| 466 return mWebViewDatabase; | 465 return mWebViewDatabase; |
| 467 } | 466 } |
| 468 | 467 |
| 469 WebViewDelegate getWebViewDelegate() { | 468 WebViewDelegate getWebViewDelegate() { |
| 470 return mWebViewDelegate; | 469 return mWebViewDelegate; |
| 471 } | 470 } |
| 472 } | 471 } |
| OLD | NEW |