| OLD | NEW |
| 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.webapps; | 5 package org.chromium.chrome.browser.webapps; |
| 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.content.Intent; | 9 import android.content.Intent; |
| 10 import android.content.SharedPreferences; | 10 import android.content.SharedPreferences; |
| 11 import android.test.suitebuilder.annotation.MediumTest; | 11 import android.support.test.filters.MediumTest; |
| 12 import android.view.View; | 12 import android.view.View; |
| 13 | 13 |
| 14 import org.chromium.base.ApplicationStatus; | 14 import org.chromium.base.ApplicationStatus; |
| 15 import org.chromium.base.ContextUtils; | 15 import org.chromium.base.ContextUtils; |
| 16 import org.chromium.base.ThreadUtils; | 16 import org.chromium.base.ThreadUtils; |
| 17 import org.chromium.base.test.util.Feature; | 17 import org.chromium.base.test.util.Feature; |
| 18 import org.chromium.base.test.util.RetryOnFailure; | 18 import org.chromium.base.test.util.RetryOnFailure; |
| 19 import org.chromium.base.test.util.UrlUtils; | 19 import org.chromium.base.test.util.UrlUtils; |
| 20 import org.chromium.blink_public.platform.WebDisplayMode; | 20 import org.chromium.blink_public.platform.WebDisplayMode; |
| 21 import org.chromium.chrome.browser.ChromeActivity; | 21 import org.chromium.chrome.browser.ChromeActivity; |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 | 330 |
| 331 WebappActivity webappActivity = (WebappActivity) lastActivity; | 331 WebappActivity webappActivity = (WebappActivity) lastActivity; |
| 332 if (webappActivity.getActivityTab() == null) return false; | 332 if (webappActivity.getActivityTab() == null) return false; |
| 333 | 333 |
| 334 View rootView = webappActivity.findViewById(android.R.id.content); | 334 View rootView = webappActivity.findViewById(android.R.id.content); |
| 335 if (!rootView.hasWindowFocus()) return false; | 335 if (!rootView.hasWindowFocus()) return false; |
| 336 | 336 |
| 337 return true; | 337 return true; |
| 338 } | 338 } |
| 339 } | 339 } |
| OLD | NEW |