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

Unified Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java

Issue 682223003: Added code to support launch new tab with context menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed mutator and modified constructor to pass tabManager Created 6 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/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java
index 8c354c660e9658013b02b66466055166514c88bc..bd24928370a51890077730fcb08010f04c2ae6c2 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java
@@ -34,13 +34,16 @@ class ChromeShellTabModelSelector extends TabModelSelectorBase {
private final TabModelOrderController mOrderController;
private AccessibilityTabModelWrapper mTabModelWrapper;
+ private TabManager mTabManager;
public ChromeShellTabModelSelector(
- WindowAndroid window, ContentVideoViewClient videoViewClient, ViewGroup parent) {
+ WindowAndroid window, ContentVideoViewClient videoViewClient, ViewGroup parent,
+ TabManager tabManager) {
mWindow = window;
mContentVideoViewClient = videoViewClient;
mParent = parent;
mOrderController = new TabModelOrderController(this);
+ mTabManager = tabManager;
TabModelDelegate tabModelDelegate = new TabModelDelegate() {
@Override
@@ -93,7 +96,7 @@ class ChromeShellTabModelSelector extends TabModelSelectorBase {
}
};
ChromeShellTab tab = new ChromeShellTab(
- mParent.getContext(), loadUrlParams.getUrl(), mWindow, client);
+ mParent.getContext(), loadUrlParams.getUrl(), mWindow, client, mTabManager);
int index = mOrderController.determineInsertionIndex(type, tab);
TabModel tabModel = getCurrentModel();
tabModel.addTab(tab, index, type);
@@ -140,4 +143,5 @@ class ChromeShellTabModelSelector extends TabModelSelectorBase {
private boolean isTabSwitcherVisible() {
return mTabModelWrapper != null && mTabModelWrapper.getParent() == mParent;
}
+
}

Powered by Google App Engine
This is Rietveld 408576698