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

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

Issue 1146813010: Introduce moderate binding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add "Tab.TotalTabCountBeforeLeavingApp" histogram Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.content.Context; 8 import android.content.Context;
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.graphics.Color; 10 import android.graphics.Color;
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 558
559 int activityState = ApplicationStatus.getStateForActivity( 559 int activityState = ApplicationStatus.getStateForActivity(
560 mWindowAndroid.getActivity().get()); 560 mWindowAndroid.getActivity().get());
561 if (!processWasOomProtected 561 if (!processWasOomProtected
562 || activityState == ActivityState.PAUSED 562 || activityState == ActivityState.PAUSED
563 || activityState == ActivityState.STOPPED 563 || activityState == ActivityState.STOPPED
564 || activityState == ActivityState.DESTROYED) { 564 || activityState == ActivityState.DESTROYED) {
565 // The tab crashed in background or was killed by the OS out-of- memory killer. 565 // The tab crashed in background or was killed by the OS out-of- memory killer.
566 //setNeedsReload(true); 566 //setNeedsReload(true);
567 mNeedsReload = true; 567 mNeedsReload = true;
568 if (!(activityState == ActivityState.PAUSED
Yaron 2015/06/11 16:54:34 Can you pull this condition out to helper fn. (als
Jaekyun Seok (inactive) 2015/06/12 06:50:19 I realized that I should have checked the applicat
569 || activityState == ActivityState.STOPPED
570 || activityState == ActivityState.DESTROYED)) {
571 UmaSessionStats.logBackgroundRendererCrashOnForegroundApp();
Yaron 2015/06/11 16:54:34 Please just use RecordUserAction directly.
Jaekyun Seok (inactive) 2015/06/12 06:50:19 Done.
572 }
568 } else { 573 } else {
569 showSadTab(); 574 showSadTab();
570 UmaSessionStats.logRendererCrash(mWindowAndroid.getActivity().ge t()); 575 UmaSessionStats.logRendererCrash(mWindowAndroid.getActivity().ge t());
571 } 576 }
572 577
573 mIsLoading = false; 578 mIsLoading = false;
574 mIsBeingRestored = false; 579 mIsBeingRestored = false;
575 handleTabCrash(); 580 handleTabCrash();
576 581
577 boolean sadTabShown = isShowingSadTab(); 582 boolean sadTabShown = isShowingSadTab();
(...skipping 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2788 private native void nativeAttachToTabContentManager(long nativeTabAndroid, 2793 private native void nativeAttachToTabContentManager(long nativeTabAndroid,
2789 TabContentManager tabContentManager); 2794 TabContentManager tabContentManager);
2790 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid , 2795 private native void nativeAttachOverlayContentViewCore(long nativeTabAndroid ,
2791 ContentViewCore content, boolean visible); 2796 ContentViewCore content, boolean visible);
2792 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid , 2797 private native void nativeDetachOverlayContentViewCore(long nativeTabAndroid ,
2793 ContentViewCore content); 2798 ContentViewCore content);
2794 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url); 2799 private native boolean nativeHasPrerenderedUrl(long nativeTabAndroid, String url);
2795 2800
2796 private static native void nativeRecordStartupToCommitUma(); 2801 private static native void nativeRecordStartupToCommitUma();
2797 } 2802 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698