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

Unified Diff: components/web_view/web_view_impl.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
« no previous file with comments | « components/web_view/web_view_impl.h ('k') | mandoline/ui/desktop_ui/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/web_view_impl.cc
diff --git a/components/web_view/web_view_impl.cc b/components/web_view/web_view_impl.cc
index 1c8654f5c0ee4a515bc9211ba8c317aa96775f16..8992496bbc2789309aa2883afe1d67c9f21a474b 100644
--- a/components/web_view/web_view_impl.cc
+++ b/components/web_view/web_view_impl.cc
@@ -59,7 +59,7 @@ WebViewImpl::~WebViewImpl() {
}
}
-void WebViewImpl::OnLoad() {
+void WebViewImpl::OnLoad(const GURL& pending_url) {
// Frames are uniqued based on the id of the associated View. By creating a
// new View each time through we ensure the renderers get a clean id, rather
// than one they may know about and try to incorrectly use.
@@ -68,6 +68,8 @@ void WebViewImpl::OnLoad() {
DCHECK(!content_);
}
+ client_->TopLevelNavigationStarted(pending_url.spec());
+
content_ = root_->connection()->CreateView();
content_->SetBounds(*mojo::Rect::From(
gfx::Rect(0, 0, root_->bounds().width, root_->bounds().height)));
@@ -131,7 +133,7 @@ void WebViewImpl::OnEmbed(mus::View* root) {
root_ = root;
if (pending_load_ && pending_load_->is_content_handler_id_valid())
- OnLoad();
+ OnLoad(pending_load_->pending_url());
}
void WebViewImpl::OnConnectionLost(mus::ViewTreeConnection* connection) {
@@ -185,7 +187,7 @@ void WebViewImpl::TitleChanged(const mojo::String& title) {
}
void WebViewImpl::NavigateTopLevel(Frame* source, mojo::URLRequestPtr request) {
- client_->TopLevelNavigate(request.Pass());
+ client_->TopLevelNavigateRequest(request.Pass());
}
void WebViewImpl::CanNavigateFrame(Frame* target,
@@ -207,7 +209,7 @@ void WebViewImpl::DidCommitProvisionalLoad(Frame* frame) {
void WebViewImpl::HandlePageNavigateRequest(const GURL& url) {
mojo::URLRequestPtr request(mojo::URLRequest::New());
request->url = url.spec();
- client_->TopLevelNavigate(request.Pass());
+ client_->TopLevelNavigateRequest(request.Pass());
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « components/web_view/web_view_impl.h ('k') | mandoline/ui/desktop_ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698