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

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

Issue 481803004: Removing ContentViewCore dependencies from few functions which acts as direct wrapper to WebContents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed review comments and rebased the patch. Created 6 years, 3 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/ContentShellUrlTest.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 4e5edbca81fffec0b3632c2188ebb6fd406fdc2c..1acea2070cce47fa8668700bc9544230d5a64730 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
@@ -126,7 +126,7 @@ public class ContentShellActivity extends Activity {
super.onSaveInstanceState(outState);
ContentViewCore contentViewCore = getActiveContentViewCore();
if (contentViewCore != null) {
- outState.putString(ACTIVE_SHELL_URL_KEY, contentViewCore.getUrl());
+ outState.putString(ACTIVE_SHELL_URL_KEY, contentViewCore.getWebContents().getUrl());
}
mWindowAndroid.saveInstanceState(outState);
@@ -144,8 +144,9 @@ public class ContentShellActivity extends Activity {
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
ContentViewCore contentViewCore = getActiveContentViewCore();
- if (contentViewCore != null && contentViewCore.canGoBack()) {
- contentViewCore.goBack();
+ if (contentViewCore != null && contentViewCore.getWebContents()
+ .getNavigationController().canGoBack()) {
+ contentViewCore.getWebContents().getNavigationController().goBack();
return true;
}
}
« no previous file with comments | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellUrlTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698