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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java

Issue 10832104: Start upstreaming accessibility. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Dan's Nits Created 8 years, 5 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
Index: content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java b/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
index 039bef5808cb9f54f94bd30a7bd2dddbca0fbc0a..40b92d11aea37fddd2a7ae4e8389099033a0ba66 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/ContentShellActivity.java
@@ -99,6 +99,22 @@ public class ContentShellActivity extends Activity {
}
}
+ @Override
+ protected void onPause() {
+ ContentView view = getActiveContentView();
+ if (view != null) view.onActivityPause();
+
+ super.onPause();
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+
+ ContentView view = getActiveContentView();
+ if (view != null) view.onActivityResume();
+ }
+
private static String getUrlFromIntent(Intent intent) {
return intent != null ? intent.getDataString() : null;
}
@@ -118,6 +134,15 @@ public class ContentShellActivity extends Activity {
return mShellManager != null ? mShellManager.getActiveShell() : null;
}
+ /**
+ * @return The {@link ContentView} owned by the currently visible {@link Shell} or null if one
+ * is not showing.
+ */
+ public ContentView getActiveContentView() {
+ Shell shell = getActiveShell();
+ return shell != null ? shell.getContentView() : null;
+ }
+
private void initializeContentViewResources() {
AppResource.DIMENSION_LINK_PREVIEW_OVERLAY_RADIUS = R.dimen.link_preview_overlay_radius;
AppResource.DRAWABLE_LINK_PREVIEW_POPUP_OVERLAY = R.drawable.popup_zoomer_overlay;
« no previous file with comments | « content/shell/android/java/AndroidManifest.xml ('k') | content/shell/android/java/src/org/chromium/content_shell/Shell.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698