Chromium Code Reviews

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.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 the nit. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: content/shell/android/java/src/org/chromium/content_shell/Shell.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
index 2b63bc0273f7b3d3d7eb7982adbfc9fae9e3f297..61b0828e3179079b434e4920ba1587b383131132 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
@@ -160,7 +160,7 @@ public class Shell extends LinearLayout {
mNextButton.setVisibility(hasFocus ? GONE : VISIBLE);
mPrevButton.setVisibility(hasFocus ? GONE : VISIBLE);
if (!hasFocus) {
- mUrlTextView.setText(mContentViewCore.getUrl());
+ mUrlTextView.setText(mContentViewCore.getWebContents().getUrl());
}
}
});
@@ -175,7 +175,7 @@ public class Shell extends LinearLayout {
public void loadUrl(String url) {
if (url == null) return;
- if (TextUtils.equals(url, mContentViewCore.getUrl())) {
+ if (TextUtils.equals(url, mContentViewCore.getWebContents().getUrl())) {
mContentViewCore.reload(true);
} else {
mContentViewCore.loadUrl(new LoadUrlParams(sanitizeUrl(url)));
@@ -258,7 +258,9 @@ public class Shell extends LinearLayout {
mContentViewCore.setContentViewClient(mContentViewClient);
if (getParent() != null) mContentViewCore.onShow();
- if (mContentViewCore.getUrl() != null) mUrlTextView.setText(mContentViewCore.getUrl());
+ if (mContentViewCore.getWebContents().getUrl() != null) {
+ mUrlTextView.setText(mContentViewCore.getWebContents().getUrl());
+ }
((FrameLayout) findViewById(R.id.contentview_holder)).addView(cv,
new FrameLayout.LayoutParams(
FrameLayout.LayoutParams.MATCH_PARENT,

Powered by Google App Engine