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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 1545973002: Remove the is_loading_ field from WebContentsImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 4558 matching lines...) Expand 10 before | Expand all | Expand 10 after
4569 routing_id_, common_params.url, common_params.navigation_start)); 4569 routing_id_, common_params.url, common_params.navigation_start));
4570 4570
4571 // Send the provisional load failure. 4571 // Send the provisional load failure.
4572 blink::WebURLError error = 4572 blink::WebURLError error =
4573 CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code); 4573 CreateWebURLError(common_params.url, has_stale_copy_in_cache, error_code);
4574 WebURLRequest failed_request = CreateURLRequestForNavigation( 4574 WebURLRequest failed_request = CreateURLRequestForNavigation(
4575 common_params, scoped_ptr<StreamOverrideParameters>(), 4575 common_params, scoped_ptr<StreamOverrideParameters>(),
4576 frame_->isViewSourceModeEnabled()); 4576 frame_->isViewSourceModeEnabled());
4577 SendFailedProvisionalLoad(failed_request, error, frame_); 4577 SendFailedProvisionalLoad(failed_request, error, frame_);
4578 4578
4579 // This check should have been done on the browser side already.
4579 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) { 4580 if (!ShouldDisplayErrorPageForFailedLoad(error_code, common_params.url)) {
4580 // TODO(avi): Remove this; we shouldn't ever be dropping navigations. 4581 NOTREACHED();
nasko 2016/01/15 01:19:16 Shouldn't this be CHECK for a short period of time
Avi (use Gerrit) 2016/01/15 04:48:00 In the comment when I said that we "shouldn't ever
clamy 2016/01/15 16:47:44 This is is a PlzNavigate only method, and I realiz
4581 // http://crbug.com/501960
4582 Send(new FrameHostMsg_DidDropNavigation(routing_id_));
4583 return; 4582 return;
4584 } 4583 }
4585 4584
4586 // Make sure errors are not shown in view source mode. 4585 // Make sure errors are not shown in view source mode.
4587 frame_->enableViewSourceMode(false); 4586 frame_->enableViewSourceMode(false);
4588 4587
4589 // Replace the current history entry in reloads, history navigations and loads 4588 // Replace the current history entry in reloads, history navigations and loads
4590 // of the same url. This corresponds to Blink's notion of a standard 4589 // of the same url. This corresponds to Blink's notion of a standard
4591 // commit. 4590 // commit.
4592 // TODO(clamy): see if initial commits in subframes should be handled 4591 // TODO(clamy): see if initial commits in subframes should be handled
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
5120 // Perform a navigation to a data url if needed. 5119 // Perform a navigation to a data url if needed.
5121 if (!common_params.base_url_for_data_url.is_empty() || 5120 if (!common_params.base_url_for_data_url.is_empty() ||
5122 (browser_side_navigation && 5121 (browser_side_navigation &&
5123 common_params.url.SchemeIs(url::kDataScheme))) { 5122 common_params.url.SchemeIs(url::kDataScheme))) {
5124 LoadDataURL(common_params, request_params, frame_, load_type); 5123 LoadDataURL(common_params, request_params, frame_, load_type);
5125 } else { 5124 } else {
5126 // Load the request. 5125 // Load the request.
5127 frame_->toWebLocalFrame()->load(request, load_type, 5126 frame_->toWebLocalFrame()->load(request, load_type,
5128 item_for_history_navigation); 5127 item_for_history_navigation);
5129 } 5128 }
5129 } else {
5130 // The browser expects the frame to be loading this navigation. Informs it
nasko 2016/01/15 01:19:16 Inform
clamy 2016/01/15 16:47:44 Done.
5131 // that the load stopped if needed.
5132 if (!frame_->isLoading())
5133 Send(new FrameHostMsg_DidStopLoading(routing_id_));
5130 } 5134 }
5131 5135
5132 // In case LoadRequest failed before didCreateDataSource was called. 5136 // In case LoadRequest failed before didCreateDataSource was called.
5133 pending_navigation_params_.reset(); 5137 pending_navigation_params_.reset();
5134 } 5138 }
5135 5139
5136 void RenderFrameImpl::UpdateEncoding(WebFrame* frame, 5140 void RenderFrameImpl::UpdateEncoding(WebFrame* frame,
5137 const std::string& encoding_name) { 5141 const std::string& encoding_name) {
5138 // Only update main frame's encoding_name. 5142 // Only update main frame's encoding_name.
5139 if (!frame->parent()) 5143 if (!frame->parent())
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
5701 media::ConvertToSwitchOutputDeviceCB(web_callbacks); 5705 media::ConvertToSwitchOutputDeviceCB(web_callbacks);
5702 scoped_refptr<media::AudioOutputDevice> device = 5706 scoped_refptr<media::AudioOutputDevice> device =
5703 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(), 5707 AudioDeviceFactory::NewOutputDevice(routing_id_, 0, sink_id.utf8(),
5704 security_origin); 5708 security_origin);
5705 media::OutputDeviceStatus status = device->GetDeviceStatus(); 5709 media::OutputDeviceStatus status = device->GetDeviceStatus();
5706 device->Stop(); 5710 device->Stop();
5707 callback.Run(status); 5711 callback.Run(status);
5708 } 5712 }
5709 5713
5710 } // namespace content 5714 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698