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

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

Issue 572013002: Removing ContentViewCore dependencies from direct WebContents functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased the patch and addressed review comments. Created 6 years, 2 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 | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
index 68d90b9c3a0f492b7f563229a28682b3fa66cefb..d3dc3fe5770f2a4df0080894da16ea9fea34f512 100644
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
@@ -22,6 +22,7 @@ import org.chromium.content.browser.BrowserStartupController;
import org.chromium.content.browser.ContentViewCore;
import org.chromium.content.browser.DeviceUtils;
import org.chromium.content.common.ContentSwitches;
+import org.chromium.content_public.browser.WebContents;
import org.chromium.content_shell.Shell;
import org.chromium.content_shell.ShellManager;
import org.chromium.ui.base.ActivityWindowAndroid;
@@ -224,4 +225,14 @@ public class ContentShellActivity extends Activity {
Shell shell = getActiveShell();
return shell != null ? shell.getContentViewCore() : null;
}
+
+ /**
+ * @return The {@link WebContents} owned by the currently visible {@link Shell} or null if
+ * one is not showing.
+ */
+ public WebContents getActiveWebContents() {
+ Shell shell = getActiveShell();
+ return shell != null ? shell.getWebContents() : null;
+ }
+
}
« no previous file with comments | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698