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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java

Issue 2268323003: Initialize RWHV with default bounds rather than only size (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
index 2e772684bbf09319b400aae86ec52671c459e2dc..e6e6d0bf82e28c72c63b7ff9fbd6b38180bba8c4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java
@@ -10,7 +10,6 @@ import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
-import android.graphics.Point;
import android.graphics.Rect;
import android.net.ConnectivityManager;
import android.net.Uri;
@@ -744,7 +743,7 @@ public class CustomTabsConnection {
if (mExternalPrerenderHandler == null) {
mExternalPrerenderHandler = new ExternalPrerenderHandler();
}
- Point contentSize = ExternalPrerenderHandler.estimateContentSize(mApplication, true);
+ Rect contentBounds = ExternalPrerenderHandler.estimateContentSize(mApplication, true);
Context context = mApplication.getApplicationContext();
String referrer = IntentHandler.getReferrerUrlIncludingExtraHeaders(extrasIntent, context);
if (referrer == null && getReferrerForSession(session) != null) {
@@ -753,7 +752,7 @@ public class CustomTabsConnection {
if (referrer == null) referrer = "";
WebContents webContents = mExternalPrerenderHandler.addPrerender(
Profile.getLastUsedProfile(), url, referrer,
- new Rect(0, 0, contentSize.x, contentSize.y),
+ contentBounds,
shouldPrerenderOnCellularForSession(session));
if (webContents == null) return false;
if (throttle) mClientManager.registerPrerenderRequest(uid, url);

Powered by Google App Engine
This is Rietveld 408576698