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

Unified Diff: mandoline/ui/desktop_ui/browser_window.cc

Issue 1350223005: mandoline: Make sure omnibox gets updated when navigating back/forwards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot.merge Created 5 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: mandoline/ui/desktop_ui/browser_window.cc
diff --git a/mandoline/ui/desktop_ui/browser_window.cc b/mandoline/ui/desktop_ui/browser_window.cc
index 069fa7d9ecc936aacb1f53031eb862a114aaf653..111761a376295a598ba9c7cc8948daed6f9b1ba0 100644
--- a/mandoline/ui/desktop_ui/browser_window.cc
+++ b/mandoline/ui/desktop_ui/browser_window.cc
@@ -234,10 +234,18 @@ void BrowserWindow::OnAccelerator(uint32_t id, mojo::EventPtr event) {
////////////////////////////////////////////////////////////////////////////////
// BrowserWindow, web_view::mojom::WebViewClient implementation:
-void BrowserWindow::TopLevelNavigate(mojo::URLRequestPtr request) {
+void BrowserWindow::TopLevelNavigateRequest(mojo::URLRequestPtr request) {
Embed(request.Pass());
}
+void BrowserWindow::TopLevelNavigationStarted(const mojo::String& url) {
+ GURL gurl(url);
+ bool changed = current_url_ != gurl;
+ current_url_ = gurl;
+ if (changed)
+ toolbar_view_->SetOmniboxText(base::UTF8ToUTF16(current_url_.spec()));
+}
+
void BrowserWindow::LoadingStateChanged(bool is_loading, double progress) {
progress_bar_->SetIsLoading(is_loading);
progress_bar_->SetProgress(progress);
@@ -268,13 +276,6 @@ void BrowserWindow::Embed(mojo::URLRequestPtr request) {
EmbedOmnibox();
return;
}
-
- GURL gurl(string_url);
- bool changed = current_url_ != gurl;
- current_url_ = gurl;
- if (changed)
- toolbar_view_->SetOmniboxText(base::UTF8ToUTF16(current_url_.spec()));
-
web_view_.web_view()->LoadRequest(request.Pass());
}
« no previous file with comments | « mandoline/ui/desktop_ui/browser_window.h ('k') | mandoline/ui/phone_ui/phone_browser_application_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698