Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |