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

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

Issue 2779033004: [Android] Focus/Blur contents when window focus changes (Closed)
Patch Set: Use pause/resume instead of WindowFocusChanged Created 3 years, 8 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 | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/ContentViewFocusTest.java » ('j') | 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/ChromeActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
index 34621b16734f9d243607966e8d7b8179862fc541..03ebc29e985bcead1c6d4e6f381afafe6b13859d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -832,6 +832,8 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
if (getActivityTab() != null) {
LaunchMetrics.commitLaunchMetrics(getActivityTab().getWebContents());
}
+ ContentViewCore cvc = getContentViewCore();
+ if (cvc != null) cvc.onResume();
FeatureUtilities.setCustomTabVisible(isCustomTab());
FeatureUtilities.setIsInMultiWindowMode(
MultiWindowUtils.getInstance().isInMultiWindowMode(this));
@@ -850,9 +852,9 @@ public abstract class ChromeActivity extends AsyncInitializationActivity
public void onPauseWithNative() {
RecordUserAction.record("MobileGoToBackground");
Tab tab = getActivityTab();
- if (tab != null) {
- getTabContentManager().cacheTabThumbnail(tab);
- }
+ if (tab != null) getTabContentManager().cacheTabThumbnail(tab);
+ ContentViewCore cvc = getContentViewCore();
+ if (cvc != null) cvc.onPause();
VrShellDelegate.maybeUnregisterVREntryHook(this);
markSessionEnd();
super.onPauseWithNative();
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/ContentViewFocusTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698