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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2472073003: Show AlertDialog when WebAPKs are enabled in chrome://flags but Unknown sources is disabled (Closed)
Patch Set: Merge branch 'master' into warning_dialog Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser; 5 package org.chromium.chrome.browser;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.app.ActivityManager; 9 import android.app.ActivityManager;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 import org.chromium.chrome.browser.tabmodel.TabModelObserver; 92 import org.chromium.chrome.browser.tabmodel.TabModelObserver;
93 import org.chromium.chrome.browser.tabmodel.TabModelSelector; 93 import org.chromium.chrome.browser.tabmodel.TabModelSelector;
94 import org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl; 94 import org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl;
95 import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabObserver; 95 import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabObserver;
96 import org.chromium.chrome.browser.tabmodel.TabModelUtils; 96 import org.chromium.chrome.browser.tabmodel.TabModelUtils;
97 import org.chromium.chrome.browser.tabmodel.TabWindowManager; 97 import org.chromium.chrome.browser.tabmodel.TabWindowManager;
98 import org.chromium.chrome.browser.toolbar.ToolbarControlContainer; 98 import org.chromium.chrome.browser.toolbar.ToolbarControlContainer;
99 import org.chromium.chrome.browser.util.FeatureUtilities; 99 import org.chromium.chrome.browser.util.FeatureUtilities;
100 import org.chromium.chrome.browser.util.IntentUtils; 100 import org.chromium.chrome.browser.util.IntentUtils;
101 import org.chromium.chrome.browser.vr_shell.VrShellDelegate; 101 import org.chromium.chrome.browser.vr_shell.VrShellDelegate;
102 import org.chromium.chrome.browser.webapps.ChromeWebApkHost;
102 import org.chromium.chrome.browser.widget.emptybackground.EmptyBackgroundViewWra pper; 103 import org.chromium.chrome.browser.widget.emptybackground.EmptyBackgroundViewWra pper;
103 import org.chromium.chrome.browser.widget.findinpage.FindToolbarManager; 104 import org.chromium.chrome.browser.widget.findinpage.FindToolbarManager;
104 import org.chromium.content.browser.ContentVideoView; 105 import org.chromium.content.browser.ContentVideoView;
105 import org.chromium.content.browser.ContentViewCore; 106 import org.chromium.content.browser.ContentViewCore;
106 import org.chromium.content.browser.crypto.CipherFactory; 107 import org.chromium.content.browser.crypto.CipherFactory;
107 import org.chromium.content.common.ContentSwitches; 108 import org.chromium.content.common.ContentSwitches;
108 import org.chromium.content_public.browser.LoadUrlParams; 109 import org.chromium.content_public.browser.LoadUrlParams;
109 import org.chromium.ui.base.DeviceFormFactor; 110 import org.chromium.ui.base.DeviceFormFactor;
110 import org.chromium.ui.base.PageTransition; 111 import org.chromium.ui.base.PageTransition;
111 import org.chromium.ui.base.WindowAndroid; 112 import org.chromium.ui.base.WindowAndroid;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 // first oppurtunity, and we don't want to show such content bac k to back. 376 // first oppurtunity, and we don't want to show such content bac k to back.
376 if (preferenceManager.getPromosSkippedOnFirstStart()) { 377 if (preferenceManager.getPromosSkippedOnFirstStart()) {
377 // Data reduction promo should be temporarily suppressed if the sign in promo is 378 // Data reduction promo should be temporarily suppressed if the sign in promo is
378 // shown to avoid nagging users too much. 379 // shown to avoid nagging users too much.
379 if (!SigninPromoUtil.launchSigninPromoIfNeeded(this)) { 380 if (!SigninPromoUtil.launchSigninPromoIfNeeded(this)) {
380 DataReductionPromoScreen.launchDataReductionPromo(this); 381 DataReductionPromoScreen.launchDataReductionPromo(this);
381 } 382 }
382 } else { 383 } else {
383 preferenceManager.setPromosSkippedOnFirstStart(true); 384 preferenceManager.setPromosSkippedOnFirstStart(true);
384 } 385 }
386
387 // Notify users experimenting with WebAPKs if they need to do ex tra steps to enable
388 // WebAPKs.
389 if (ChromeVersionInfo.isCanaryBuild() || ChromeVersionInfo.isDev Build()) {
gone 2016/11/04 22:07:43 Move the channel check into #launchWebApkRequireme
390 ChromeWebApkHost.launchWebApkRequirementsDialogIfNeeded(this );
391 }
385 } 392 }
386 393
387 initializeUI(); 394 initializeUI();
388 395
389 // The dataset has already been created, we need to initialize our s tate. 396 // The dataset has already been created, we need to initialize our s tate.
390 mTabModelSelectorImpl.notifyChanged(); 397 mTabModelSelectorImpl.notifyChanged();
391 398
392 getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS, 399 getWindow().setFeatureInt(Window.FEATURE_INDETERMINATE_PROGRESS,
393 Window.PROGRESS_VISIBILITY_OFF); 400 Window.PROGRESS_VISIBILITY_OFF);
394 401
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 */ 1701 */
1695 public static void onMultiInstanceModeStarted() { 1702 public static void onMultiInstanceModeStarted() {
1696 // When a second instance is created, the merged instance task id should be cleared. 1703 // When a second instance is created, the merged instance task id should be cleared.
1697 setMergedInstanceTaskId(0); 1704 setMergedInstanceTaskId(0);
1698 } 1705 }
1699 1706
1700 private static void setMergedInstanceTaskId(int mergedInstanceTaskId) { 1707 private static void setMergedInstanceTaskId(int mergedInstanceTaskId) {
1701 sMergedInstanceTaskId = mergedInstanceTaskId; 1708 sMergedInstanceTaskId = mergedInstanceTaskId;
1702 } 1709 }
1703 } 1710 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698