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

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

Issue 2018113002: Upstream: Do not show the add-to-homescreen/install-native-app infobar for WebAPKs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.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/webapps/FullScreenDelegateFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenDelegateFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenDelegateFactory.java
index 2311ad4a63f55de5333d5a81731d933b767a9bd2..283a24f0dfaad892ded078c0a873a8d6012aa7f6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenDelegateFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/FullScreenDelegateFactory.java
@@ -4,16 +4,11 @@
package org.chromium.chrome.browser.webapps;
-import android.content.Context;
-import android.content.Intent;
-
-import org.chromium.chrome.browser.ShortcutHelper;
import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulator;
import org.chromium.chrome.browser.contextmenu.ContextMenuPopulator;
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.tab.TopControlsVisibilityDelegate;
/**
@@ -21,41 +16,6 @@ import org.chromium.chrome.browser.tab.TopControlsVisibilityDelegate;
* by a {@link FullScreenActivity}.
*/
public class FullScreenDelegateFactory extends TabDelegateFactory {
- private static class FullScreenTabWebContentsDelegateAndroid
- extends TabWebContentsDelegateAndroid {
-
- public FullScreenTabWebContentsDelegateAndroid(Tab tab) {
- super(tab);
- }
-
- @Override
- public void activateContents() {
- Context context = mTab.getWindowAndroid().getContext().get();
- if (!(context instanceof WebappActivity)) return;
-
- WebappInfo webappInfo = ((WebappActivity) context).getWebappInfo();
- String url = webappInfo.uri().toString();
-
- // Create an Intent that will be fired toward the WebappLauncherActivity, which in turn
- // will fire an Intent to launch the correct WebappActivity. On L+ this could probably
- // be changed to call AppTask.moveToFront(), but for backwards compatibility we relaunch
- // it the hard way.
- Intent intent = new Intent();
- intent.setAction(WebappLauncherActivity.ACTION_START_WEBAPP);
- intent.setPackage(context.getPackageName());
- webappInfo.setWebappIntentExtras(intent);
-
- intent.putExtra(ShortcutHelper.EXTRA_MAC, ShortcutHelper.getEncodedMac(context, url));
- intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
- context.getApplicationContext().startActivity(intent);
- }
- }
-
- @Override
- public FullScreenTabWebContentsDelegateAndroid createWebContentsDelegate(Tab tab) {
- return new FullScreenTabWebContentsDelegateAndroid(tab);
- }
-
@Override
public ContextMenuPopulator createContextMenuPopulator(Tab tab) {
return new ChromeContextMenuPopulator(new TabContextMenuItemDelegate(tab),
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698