Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java |
| index 5624ca48b2a96f94ba86fa9042fe5946de87a459..d6e4121c833bd2367da26d1cb6b9ab34aa12e041 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java |
| @@ -54,6 +54,7 @@ class ClientManager { |
| public final IBinder.DeathRecipient deathRecipient; |
| public boolean mIgnoreFragments; |
| private boolean mShouldHideDomain; |
| + private boolean mShouldPrerenderOnMobile; |
| private ServiceConnection mKeepAliveConnection; |
| private String mPredictedUrl; |
| private long mLastMayLaunchUrlTimestamp; |
| @@ -273,6 +274,22 @@ class ClientManager { |
| params.mIgnoreFragments = value; |
| } |
| + /** |
| + * @return Whether prerender should be turned on for mobile networks for given session. |
| + */ |
| + public synchronized boolean shouldPrerenderOnMobileForSession(IBinder session) { |
| + SessionParams params = mSessionParams.get(session); |
| + return params != null ? params.mShouldPrerenderOnMobile : false; |
| + } |
| + |
| + /** |
| + * Sets whether prerender should be turned on for mobile networks for given session. |
| + */ |
| + public synchronized void setPrerenderOnMobileForSession(IBinder session, boolean prerender) { |
| + SessionParams params = mSessionParams.get(session); |
| + if (params != null) params.mShouldPrerenderOnMobile = prerender; |
|
gone
2016/03/09 23:02:14
should setIgnoreFragmentsForSession also check if
Yusuf
2016/03/09 23:22:49
Done.
|
| + } |
| + |
| /** Tries to bind to a client to keep it alive, and returns true for success. */ |
| public synchronized boolean keepAliveForSession(IBinder session, Intent intent) { |
| // When an application is bound to a service, its priority is raised to |