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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2299453002: Restrict number of BlimpContents to [0, 1] (Closed)
Patch Set: 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/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index e914ba5da5ff5d7812c01579ecc70b25ee13ad2b..16c23808f7a04864a1d877c2b4f5a5232f8543bc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -1503,7 +1503,11 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
Profile profile = Profile.getLastUsedProfile();
if (mIncognito) profile = profile.getOffTheRecordProfile();
mBlimpContents = nativeInitBlimpContents(mNativeTabAndroid, profile);
- getBlimpContents().addObserver(new TabBlimpContentsObserver(this));
+ if (mBlimpContents) {
+ getBlimpContents().addObserver(new TabBlimpContentsObserver(this));
+ } else {
+ mBlimp = false;
+ }
}
boolean creatingWebContents = webContents == null;
« blimp/client/public/blimp_client_context.h ('K') | « blimp/client/public/blimp_client_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698