Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java

Issue 831523004: Enable posting a message from JS to Android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add v8 as a dependency Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.content.Context; 7 import android.content.Context;
8 import android.content.SharedPreferences; 8 import android.content.SharedPreferences;
9 9
10 import org.chromium.content.browser.ContentViewStatics; 10 import org.chromium.content.browser.ContentViewStatics;
(...skipping 10 matching lines...) Expand all
21 21
22 private static final String HTTP_AUTH_DATABASE_FILE = "http_auth.db"; 22 private static final String HTTP_AUTH_DATABASE_FILE = "http_auth.db";
23 23
24 private SharedPreferences mSharedPreferences; 24 private SharedPreferences mSharedPreferences;
25 25
26 private AwGeolocationPermissions mGeolocationPermissions; 26 private AwGeolocationPermissions mGeolocationPermissions;
27 private AwCookieManager mCookieManager; 27 private AwCookieManager mCookieManager;
28 private AwFormDatabase mFormDatabase; 28 private AwFormDatabase mFormDatabase;
29 private HttpAuthDatabase mHttpAuthDatabase; 29 private HttpAuthDatabase mHttpAuthDatabase;
30 private DefaultAndroidKeyStore mLocalKeyStore; 30 private DefaultAndroidKeyStore mLocalKeyStore;
31 private AwMessagePortService mMessagePortService;
31 32
32 public AwBrowserContext(SharedPreferences sharedPreferences) { 33 public AwBrowserContext(SharedPreferences sharedPreferences) {
33 mSharedPreferences = sharedPreferences; 34 mSharedPreferences = sharedPreferences;
34 } 35 }
35 36
36 public AwGeolocationPermissions getGeolocationPermissions() { 37 public AwGeolocationPermissions getGeolocationPermissions() {
37 if (mGeolocationPermissions == null) { 38 if (mGeolocationPermissions == null) {
38 mGeolocationPermissions = new AwGeolocationPermissions(mSharedPrefer ences); 39 mGeolocationPermissions = new AwGeolocationPermissions(mSharedPrefer ences);
39 } 40 }
40 return mGeolocationPermissions; 41 return mGeolocationPermissions;
(...skipping 20 matching lines...) Expand all
61 return mHttpAuthDatabase; 62 return mHttpAuthDatabase;
62 } 63 }
63 64
64 public DefaultAndroidKeyStore getKeyStore() { 65 public DefaultAndroidKeyStore getKeyStore() {
65 if (mLocalKeyStore == null) { 66 if (mLocalKeyStore == null) {
66 mLocalKeyStore = new DefaultAndroidKeyStore(); 67 mLocalKeyStore = new DefaultAndroidKeyStore();
67 } 68 }
68 return mLocalKeyStore; 69 return mLocalKeyStore;
69 } 70 }
70 71
72 public AwMessagePortService createMessagePortService() {
73 if (mMessagePortService == null) {
74 mMessagePortService = new AwMessagePortService();
75 }
76 return mMessagePortService;
77 }
78
71 /** 79 /**
72 * @see android.webkit.WebView#pauseTimers() 80 * @see android.webkit.WebView#pauseTimers()
73 */ 81 */
74 public void pauseTimers() { 82 public void pauseTimers() {
75 ContentViewStatics.setWebKitSharedTimersSuspended(true); 83 ContentViewStatics.setWebKitSharedTimersSuspended(true);
76 } 84 }
77 85
78 /** 86 /**
79 * @see android.webkit.WebView#resumeTimers() 87 * @see android.webkit.WebView#resumeTimers()
80 */ 88 */
81 public void resumeTimers() { 89 public void resumeTimers() {
82 ContentViewStatics.setWebKitSharedTimersSuspended(false); 90 ContentViewStatics.setWebKitSharedTimersSuspended(false);
83 } 91 }
84 } 92 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698