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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.content_shell_apk; 5 package org.chromium.content_shell_apk;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
11 import android.util.Log; 11 import android.util.Log;
12 import android.view.KeyEvent; 12 import android.view.KeyEvent;
13 import android.widget.Toast; 13 import android.widget.Toast;
14 14
15 import org.chromium.base.BaseSwitches; 15 import org.chromium.base.BaseSwitches;
16 import org.chromium.base.CommandLine; 16 import org.chromium.base.CommandLine;
17 import org.chromium.base.MemoryPressureListener; 17 import org.chromium.base.MemoryPressureListener;
18 import org.chromium.base.library_loader.LibraryLoader; 18 import org.chromium.base.library_loader.LibraryLoader;
19 import org.chromium.base.library_loader.ProcessInitException; 19 import org.chromium.base.library_loader.ProcessInitException;
20 import org.chromium.content.app.ContentApplication; 20 import org.chromium.content.app.ContentApplication;
21 import org.chromium.content.browser.BrowserStartupController; 21 import org.chromium.content.browser.BrowserStartupController;
22 import org.chromium.content.browser.ContentViewCore; 22 import org.chromium.content.browser.ContentViewCore;
23 import org.chromium.content.browser.DeviceUtils; 23 import org.chromium.content.browser.DeviceUtils;
24 import org.chromium.content.common.ContentSwitches; 24 import org.chromium.content.common.ContentSwitches;
25 import org.chromium.content_public.browser.WebContents;
25 import org.chromium.content_shell.Shell; 26 import org.chromium.content_shell.Shell;
26 import org.chromium.content_shell.ShellManager; 27 import org.chromium.content_shell.ShellManager;
27 import org.chromium.ui.base.ActivityWindowAndroid; 28 import org.chromium.ui.base.ActivityWindowAndroid;
28 import org.chromium.ui.base.WindowAndroid; 29 import org.chromium.ui.base.WindowAndroid;
29 30
30 /** 31 /**
31 * Activity for managing the Content Shell. 32 * Activity for managing the Content Shell.
32 */ 33 */
33 public class ContentShellActivity extends Activity { 34 public class ContentShellActivity extends Activity {
34 35
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 } 218 }
218 219
219 /** 220 /**
220 * @return The {@link ContentViewCore} owned by the currently visible {@link Shell} or null if 221 * @return The {@link ContentViewCore} owned by the currently visible {@link Shell} or null if
221 * one is not showing. 222 * one is not showing.
222 */ 223 */
223 public ContentViewCore getActiveContentViewCore() { 224 public ContentViewCore getActiveContentViewCore() {
224 Shell shell = getActiveShell(); 225 Shell shell = getActiveShell();
225 return shell != null ? shell.getContentViewCore() : null; 226 return shell != null ? shell.getContentViewCore() : null;
226 } 227 }
228
229 /**
230 * @return The {@link WebContents} owned by the currently visible {@link She ll} or null if
231 * one is not showing.
232 */
233 public WebContents getActiveWebContents() {
234 Shell shell = getActiveShell();
235 return shell != null ? shell.getWebContents() : null;
236 }
237
227 } 238 }
OLDNEW
« 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