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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 1470383003: Revert Revert of Start calling show/hide onStart/onStop in DocumentActivity) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed failing test expectations Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 502f24ce096deaff153c37cfc2969c425f86321b..a93bbb6a05cb82f8c320c80482c28a272a1056bf 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -1085,20 +1085,9 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
* Called on the foreground tab when the Activity showing the Tab gets started. This is called
* on both cold and warm starts.
*/
- public void onActivityStart() {
- onActivityStartInternal(true);
- }
-
- /**
- * Called on the foreground tab when the Activity showing the Tab gets stopped.
- */
- public void onActivityStop() {
- hide();
- }
-
- protected void onActivityStartInternal(boolean showNow) {
+ public void onActivityShown() {
if (isHidden()) {
- if (showNow) show(TabSelectionType.FROM_USER);
+ show(TabSelectionType.FROM_USER);
} else {
// The visible Tab's renderer process may have died after the activity was paused.
// Ensure that it's restored appropriately.
@@ -1112,6 +1101,13 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
}
/**
+ * Called on the foreground tab when the Activity showing the Tab gets stopped.
+ */
+ public void onActivityHidden() {
+ hide();
+ }
+
+ /**
* @return Whether the tab is ready to display or it should be faded in as it loads.
*/
public boolean shouldStall() {

Powered by Google App Engine
This is Rietveld 408576698