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

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

Issue 1318853002: [Custom Tabs]Fix a bug that activateContents will pop up a blank chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTab.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java
index 4f7869e8622462011d760637faa087bb43ae4f08..1ac44bd4782835383d470aa0acd679f9a3301351 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/ChromeTab.java
@@ -420,9 +420,14 @@ public class ChromeTab extends Tab {
TabModel model = getTabModel();
int index = model.indexOf(ChromeTab.this);
if (index == TabModel.INVALID_TAB_INDEX) return;
-
TabModelUtils.setIndex(model, index);
+ bringActivityToForeground();
+ }
+ /**
+ * Brings chrome's Activity to foreground, if it is not so.
+ */
+ protected void bringActivityToForeground() {
// This intent is sent in order to get the activity back to the foreground if it was
// not already. The previous call will activate the right tab in the context of the
// TabModel but will only show the tab to the user if Chrome was already in the
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTab.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698