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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java

Issue 2946223002: Replaces FullscreenActivity with SingleTabActivity. (Closed)
Patch Set: Removes the WebContentsObserver on reparenting in FullscreenWebContentsActivity Created 3 years, 5 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/webapps/WebappDelegateFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
index 5b9fd317a83a21f9fc92017cc6e9732fca4f938d..a6121a900b2f18ca8b471a918c4b3ee6f223ae87 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDelegateFactory.java
@@ -9,9 +9,13 @@ import android.text.TextUtils;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.browser.ShortcutHelper;
+import org.chromium.chrome.browser.SingleTabActivity;
+import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
+import org.chromium.chrome.browser.contextmenu.ContextMenuPopulator;
import org.chromium.chrome.browser.tab.BrowserControlsVisibilityDelegate;
import org.chromium.chrome.browser.tab.InterceptNavigationDelegateImpl;
import org.chromium.chrome.browser.tab.Tab;
+import org.chromium.chrome.browser.tab.TabContextMenuItemDelegate;
import org.chromium.chrome.browser.tab.TabDelegateFactory;
import org.chromium.chrome.browser.tab.TabWebContentsDelegateAndroid;
import org.chromium.chrome.browser.util.IntentUtils;
@@ -19,9 +23,9 @@ import org.chromium.webapk.lib.client.WebApkNavigationClient;
/**
* A {@link TabDelegateFactory} class to be used in all {@link Tab} instances owned by a
- * {@link FullScreenActivity}.
+ * {@link SingleTabActivity}.
*/
-public class WebappDelegateFactory extends FullScreenDelegateFactory {
+public class WebappDelegateFactory extends TabDelegateFactory {
private static class WebappWebContentsDelegateAndroid extends TabWebContentsDelegateAndroid {
private final WebappActivity mActivity;
@@ -64,6 +68,12 @@ public class WebappDelegateFactory extends FullScreenDelegateFactory {
mActivity = activity;
}
+ @Override
+ public ContextMenuPopulator createContextMenuPopulator(Tab tab) {
+ return new ChromeContextMenuPopulator(
+ new TabContextMenuItemDelegate(tab), ChromeContextMenuPopulator.WEB_APP_MODE);
+ }
+
@Override
public TabWebContentsDelegateAndroid createWebContentsDelegate(Tab tab) {
return new WebappWebContentsDelegateAndroid(mActivity, tab);
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698