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

Side by Side Diff: components/web_view/pending_web_view_load.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, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/web_view/pending_web_view_load.h" 5 #include "components/web_view/pending_web_view_load.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "components/web_view/frame_connection.h" 9 #include "components/web_view/frame_connection.h"
10 #include "components/web_view/web_view_impl.h" 10 #include "components/web_view/web_view_impl.h"
11 11
12 namespace web_view { 12 namespace web_view {
13 13
14 PendingWebViewLoad::PendingWebViewLoad(WebViewImpl* web_view) 14 PendingWebViewLoad::PendingWebViewLoad(WebViewImpl* web_view)
15 : web_view_(web_view), is_content_handler_id_valid_(false) {} 15 : web_view_(web_view), is_content_handler_id_valid_(false) {}
16 16
17 PendingWebViewLoad::~PendingWebViewLoad() {} 17 PendingWebViewLoad::~PendingWebViewLoad() {}
18 18
19 void PendingWebViewLoad::Init(mojo::URLRequestPtr request) { 19 void PendingWebViewLoad::Init(mojo::URLRequestPtr request) {
20 DCHECK(!frame_connection_); 20 DCHECK(!frame_connection_);
21 pending_url_ = GURL(request->url);
21 frame_connection_.reset(new FrameConnection); 22 frame_connection_.reset(new FrameConnection);
22 frame_connection_->Init(web_view_->app_, request.Pass(), 23 frame_connection_->Init(web_view_->app_, request.Pass(),
23 base::Bind(&PendingWebViewLoad::OnGotContentHandlerID, 24 base::Bind(&PendingWebViewLoad::OnGotContentHandlerID,
24 base::Unretained(this))); 25 base::Unretained(this)));
25 } 26 }
26 27
27 void PendingWebViewLoad::OnGotContentHandlerID() { 28 void PendingWebViewLoad::OnGotContentHandlerID() {
28 is_content_handler_id_valid_ = true; 29 is_content_handler_id_valid_ = true;
29 if (web_view_->root_) 30 if (web_view_->root_)
30 web_view_->OnLoad(); 31 web_view_->OnLoad(pending_url_);
31 // The else case is handled by WebViewImpl when it gets the View (|root_|). 32 // The else case is handled by WebViewImpl when it gets the View (|root_|).
32 } 33 }
33 34
34 } // namespace web_view 35 } // namespace web_view
OLDNEW
« no previous file with comments | « components/web_view/pending_web_view_load.h ('k') | components/web_view/public/interfaces/web_view.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698