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

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

Issue 1921873004: Add a null check to ChromeActivity#onStartWithNative() (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2704
Patch Set: Created 4 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.annotation.TargetApi; 8 import android.annotation.TargetApi;
9 import android.app.Activity; 9 import android.app.Activity;
10 import android.app.SearchManager; 10 import android.app.SearchManager;
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 createContextReporterIfNeeded(); 571 createContextReporterIfNeeded();
572 } else { 572 } else {
573 ContextReporter.reportStatus(ContextReporter.STATUS_GSA_NOT_AVAILABL E); 573 ContextReporter.reportStatus(ContextReporter.STATUS_GSA_NOT_AVAILABL E);
574 } 574 }
575 mCompositorViewHolder.resetFlags(); 575 mCompositorViewHolder.resetFlags();
576 576
577 // postDeferredStartupIfNeeded() is called in TabModelSelectorTabObsever #onLoadStopped(), 577 // postDeferredStartupIfNeeded() is called in TabModelSelectorTabObsever #onLoadStopped(),
578 // #onPageLoadFinished() and #onCrash(). If we are not actively loading a tab (e.g. 578 // #onPageLoadFinished() and #onCrash(). If we are not actively loading a tab (e.g.
579 // in Android N multi-instance, which is created by re-parenting an exis ting tab), 579 // in Android N multi-instance, which is created by re-parenting an exis ting tab),
580 // ensure onDeferredStartup() gets called by calling postDeferredStartup IfNeeded() here. 580 // ensure onDeferredStartup() gets called by calling postDeferredStartup IfNeeded() here.
581 if (!getActivityTab().isLoading()) { 581 if (getActivityTab() == null || !getActivityTab().isLoading()) {
582 postDeferredStartupIfNeeded(); 582 postDeferredStartupIfNeeded();
583 } 583 }
584 } 584 }
585 585
586 @Override 586 @Override
587 public void onWindowFocusChanged(boolean hasFocus) { 587 public void onWindowFocusChanged(boolean hasFocus) {
588 super.onWindowFocusChanged(hasFocus); 588 super.onWindowFocusChanged(hasFocus);
589 Tab tab = getActivityTab(); 589 Tab tab = getActivityTab();
590 if (tab == null) return; 590 if (tab == null) return;
591 if (hasFocus) { 591 if (hasFocus) {
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1741 "Android.MultiWindowMode.IsTabletScreenWidthBelow600", 1741 "Android.MultiWindowMode.IsTabletScreenWidthBelow600",
1742 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP); 1742 mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP);
1743 1743
1744 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) { 1744 if (mScreenWidthDp < DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP) {
1745 RecordHistogram.recordLinearCountHistogram( 1745 RecordHistogram.recordLinearCountHistogram(
1746 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1, 1746 "Android.MultiWindowMode.TabletScreenWidth", mScreenWidthDp, 1,
1747 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50); 1747 DeviceFormFactor.MINIMUM_TABLET_WIDTH_DP, 50);
1748 } 1748 }
1749 } 1749 }
1750 } 1750 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698