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

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

Issue 2062083002: Implements the Lightweight First Run Experience (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 4 years, 6 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 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.app.Activity; 7 import android.app.Activity;
8 import android.app.ActivityManager; 8 import android.app.ActivityManager;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 * been exposed to the ToS and Privacy Notice. 927 * been exposed to the ToS and Privacy Notice.
928 */ 928 */
929 private void launchFirstRunExperience() { 929 private void launchFirstRunExperience() {
930 if (mIsOnFirstRun) { 930 if (mIsOnFirstRun) {
931 mTabModelSelectorImpl.clearState(); 931 mTabModelSelectorImpl.clearState();
932 return; 932 return;
933 } 933 }
934 934
935 final boolean isIntentActionMain = getIntent() != null 935 final boolean isIntentActionMain = getIntent() != null
936 && TextUtils.equals(getIntent().getAction(), Intent.ACTION_MAIN) ; 936 && TextUtils.equals(getIntent().getAction(), Intent.ACTION_MAIN) ;
937 final Intent freIntent = FirstRunFlowSequencer.checkIfFirstRunIsNecessar y( 937 final Intent freIntent =
938 this, isIntentActionMain); 938 FirstRunFlowSequencer.checkIfFirstRunIsNecessary(this, isIntentA ctionMain,
939 IntentHandler.determineExternalIntentSource(getPackageNa me(), getIntent()));
939 if (freIntent == null) return; 940 if (freIntent == null) return;
940 941
941 mIsOnFirstRun = true; 942 mIsOnFirstRun = true;
942 943
943 // TODO(dtrainor): Investigate this further and revert once Android push es fix? 944 // TODO(dtrainor): Investigate this further and revert once Android push es fix?
944 // Posting this due to Android bug where we apparently are stopping a 945 // Posting this due to Android bug where we apparently are stopping a
945 // non-resumed activity. That statement looks incorrect, but need to no t hit 946 // non-resumed activity. That statement looks incorrect, but need to no t hit
946 // the runtime exception here. 947 // the runtime exception here.
947 mHandler.post(new Runnable() { 948 mHandler.post(new Runnable() {
948 @Override 949 @Override
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 if (getActivityTab() != null) { 1418 if (getActivityTab() != null) {
1418 setStatusBarColor(getActivityTab(), getActivityTab().getThemeColor() ); 1419 setStatusBarColor(getActivityTab(), getActivityTab().getThemeColor() );
1419 } 1420 }
1420 } 1421 }
1421 1422
1422 @Override 1423 @Override
1423 protected void setStatusBarColor(Tab tab, int color) { 1424 protected void setStatusBarColor(Tab tab, int color) {
1424 super.setStatusBarColor(tab, isInOverviewMode() ? Color.BLACK : color); 1425 super.setStatusBarColor(tab, isInOverviewMode() ? Color.BLACK : color);
1425 } 1426 }
1426 } 1427 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698