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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/document/DocumentTab.java

Issue 1416093004: Remove CustomTab and have all CustomTabActivity using Tab (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed clang build error Created 5 years, 2 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/document/DocumentTab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/document/DocumentTab.java b/chrome/android/java/src/org/chromium/chrome/browser/document/DocumentTab.java
index 3fecb55a5f0bc4c48f4f9ad827c3585c8da5298f..ce0b9e5d616073dd243d46db876a358b5d785e82 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/document/DocumentTab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/document/DocumentTab.java
@@ -17,6 +17,7 @@ import org.chromium.chrome.browser.WebContentsFactory;
import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
import org.chromium.chrome.browser.tab.EmptyTabObserver;
import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.chrome.browser.tab.TabDelegateFactory;
import org.chromium.chrome.browser.tab.TabObserver;
import org.chromium.chrome.browser.tab.TabUma;
import org.chromium.chrome.browser.tab.TabUma.TabCreationState;
@@ -121,7 +122,13 @@ public class DocumentTab extends Tab {
? WarmupManager.getInstance().takePrerenderedWebContents()
: WebContentsFactory.createWebContents(isIncognito(), initiallyHidden);
}
- initialize(webContents, tabContentManager, initiallyHidden);
+ initialize(webContents, tabContentManager, new TabDelegateFactory() {
+ @Override
+ public TabWebContentsDelegateAndroid createWebContentsDelegate(
+ Tab tab, ChromeActivity activity) {
+ return new DocumentTabWebContentsDelegateAndroid(DocumentTab.this, mActivity);
+ }
+ }, initiallyHidden);
if (unfreeze) mDidRestoreState = unfreezeContents();
getView().requestFocus();
@@ -158,11 +165,6 @@ public class DocumentTab extends Tab {
}
}
- @Override
- protected TabWebContentsDelegateAndroid createWebContentsDelegate() {
- return new DocumentTabWebContentsDelegateAndroid(this, mActivity);
- }
-
/**
* @return Whether or not the tab's state was restored.
*/

Powered by Google App Engine
This is Rietveld 408576698