Mojo: Ensure the HTML viewer keeps the URLLoader alive long enough to finish

loading the request. This fixes a bug where large pages would only partially
load.

Review URL: https://codereview.chromium.org/437353003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287586 0039d316-1c4b-4281-b951-d872f2087c98
parent 138a5f95
......@@ -50,9 +50,9 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate {
blink::shutdown();
}
void Load(URLResponsePtr response) {
void Load(ResponseDetailsPtr response_details) {
// Need to wait for OnEmbed.
response_ = response.Pass();
response_details_ = response_details.Pass();
MaybeLoad();
}
......@@ -85,8 +85,8 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate {
}
void MaybeLoad() {
if (document_view_ && response_)
document_view_->Load(response_.Pass());
if (document_view_ && response_details_)
document_view_->Load(response_details_->response.Pass());
}
scoped_ptr<BlinkPlatformImpl> blink_platform_impl_;
......@@ -94,7 +94,7 @@ class HTMLViewer : public ApplicationDelegate, public ViewManagerDelegate {
// TODO(darin): Figure out proper ownership of this instance.
HTMLDocumentView* document_view_;
URLResponsePtr response_;
ResponseDetailsPtr response_details_;
InterfaceFactoryImplWithContext<NavigatorImpl, HTMLViewer> navigator_factory_;
ViewManagerClientFactory view_manager_client_factory_;
......@@ -105,7 +105,7 @@ void NavigatorImpl::Navigate(
uint32_t node_id,
NavigationDetailsPtr navigation_details,
ResponseDetailsPtr response_details) {
viewer_->Load(response_details->response.Pass());
viewer_->Load(response_details.Pass());
}
// static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment