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

Unified Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.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
Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
index ed9e570f8a0b2b6f8b3f85da2c98e0e685ad4cbd..12c5e20763ebe3d91b398ba18ec77ce118c11359 100644
--- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
+++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java
@@ -80,7 +80,7 @@ public class ChromeShellToolbar extends LinearLayout {
if (mTab != null) mTab.removeObserver(mTabObserver);
mTab = tab;
mTab.addObserver(mTabObserver);
- mUrlTextView.setText(mTab.getContentViewCore().getUrl());
+ mUrlTextView.setText(mTab.getWebContents().getUrl());
}
private void onUpdateUrl(String url) {
@@ -145,7 +145,7 @@ public class ChromeShellToolbar extends LinearLayout {
public void onFocusChange(View v, boolean hasFocus) {
setKeyboardVisibilityForUrl(hasFocus);
if (!hasFocus) {
- mUrlTextView.setText(mTab.getContentViewCore().getUrl());
+ mUrlTextView.setText(mTab.getWebContents().getUrl());
mSuggestionPopup.dismissPopup();
}
}
@@ -190,9 +190,9 @@ public class ChromeShellToolbar extends LinearLayout {
@Override
public void onClick(View v) {
if (mLoading) {
- mTab.getContentViewCore().stopLoading();
+ mTab.getWebContents().stop();
} else {
- mTab.getContentViewCore().reload(true);
+ mTab.getWebContents().getNavigationController().reload(true);
}
}
});

Powered by Google App Engine
This is Rietveld 408576698