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

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

Issue 12313055: Create java AwBrowserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.android_webview;
6
7 import android.content.Context;
benm (inactive) 2013/02/22 12:05:44 nit: not needed?
Kristian Monsen 2013/02/22 20:50:18 Done.
8 import android.content.SharedPreferences;
9
10 import org.chromium.base.PathUtils;
11 import org.chromium.base.ThreadUtils;
benm (inactive) 2013/02/22 12:05:44 these two not needed also? Maybe check all these
Kristian Monsen 2013/02/22 20:50:18 I think only shared prefs are needed.
12 import org.chromium.content.app.LibraryLoader;
13 import org.chromium.content.browser.AndroidBrowserProcess;
14 import org.chromium.content.browser.ResourceExtractor;
15 import org.chromium.content.common.ProcessInitException;
16
17 /**
18 * Java side of the Browser Context: contains all the java side objects needed t o host one
19 * browing session (i.e. profile).
20 * Note that due to running in single process mode, and limitations on renderer process only
21 * being able to use a single browser context, currently there can only be one A wBrowserContext
22 * instance, so at this point the class mostly exists for conceptual clarity.
23 *
24 * Obtain the default (singleton) instance with AwBrowserProcess.getDefaultBrow serContext().
25 */
26 public class AwBrowserContext {
27
28 private SharedPreferences mSharedPreferences;
29
30 private AwGeolocationPermissions mGeolocationPermissions;
31 private AwCookieManager mCookieManager;
32
33 public AwBrowserContext(SharedPreferences sharedPreferences) {
34 mSharedPreferences = sharedPreferences;
35 }
36
37 public AwGeolocationPermissions getGeolocationPermissions() {
38 if (mGeolocationPermissions == null) {
39 mGeolocationPermissions = new AwGeolocationPermissions(mSharedPrefer ences);
40 }
41 return mGeolocationPermissions;
42 }
43
44 public AwCookieManager getCookieManager() {
45 if (mCookieManager == null) {
46 mCookieManager = new AwCookieManager();
47 }
48 return mCookieManager;
49 }
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698