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

Unified Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.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
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
index 1293564c4f3b0dce40788c74d3f36ddabc3d7606..c2bfd51f0f8f1dc45e94153e0a755358acbbe9fc 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTab.java
@@ -12,6 +12,7 @@ import org.chromium.chrome.browser.UrlUtilities;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
import org.chromium.chrome.browser.contextmenu.ContextMenuPopulator;
import org.chromium.chrome.browser.infobar.AutoLoginProcessor;
+import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
import org.chromium.content.browser.ContentViewClient;
import org.chromium.content_public.browser.LoadUrlParams;
import org.chromium.content_public.browser.NavigationController;
@@ -27,6 +28,7 @@ public class ChromeShellTab extends Tab {
// Tab state
private boolean mIsLoading;
private boolean mIsFullscreen = false;
+ private TabManager mTabManager;
/**
* @param context The Context the view is running in.
@@ -35,12 +37,13 @@ public class ChromeShellTab extends Tab {
* @param contentViewClient The client for the {@link ContentViewCore}s of this Tab.
*/
public ChromeShellTab(Context context, String url, WindowAndroid window,
- ContentViewClient contentViewClient) {
+ ContentViewClient contentViewClient, TabManager tabManager) {
super(false, context, window);
initialize();
initContentViewCore();
setContentViewClient(contentViewClient);
loadUrlWithSanitization(url);
+ mTabManager = tabManager;
}
/**
@@ -109,6 +112,11 @@ public class ChromeShellTab extends Tab {
public void onOpenImageUrl(String url, Referrer referrer) {
loadUrlWithSanitization(url);
}
+
+ @Override
+ public void onOpenInNewTab(String url, Referrer referrer) {
+ mTabManager.createTab(url, TabLaunchType.FROM_LINK);
+ }
});
}
« no previous file with comments | « no previous file | chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698