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

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

Issue 2773273002: Last_n: do not save snapshot of custom tabs. (Closed)
Patch Set: Renamed method; added custom tab checks to tests. Created 3 years, 9 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b6b3dac2e70a20c947d26792076dbba34d41ca24..5623df08703de7d5b766f1edca9a398e92bcbe10 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
@@ -2229,6 +2229,18 @@ public class Tab
for (TabObserver observer : mObservers) observer.onFaviconUpdated(this, icon);
}
+
+ /**
+ * Checks if this tab is currently presented in the context of custom tabs. Tabs can be moved
+ * between different activities so the returned value might change over the lifetime of the tab.
+ * @return true if this is currently a custom tab.
+ */
+ @CalledByNative
+ public boolean isCurrentlyACustomTab() {
+ ChromeActivity activity = getActivity();
+ return activity != null && activity.isCustomTab();
+ }
+
/**
* Called when the navigation entry containing the history item changed,
* for example because of a scroll offset or form field change.
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698