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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2494633004: Remove about:srcdoc url conversion. (Closed)
Patch Set: Addressed comments. Created 4 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <utility> 10 #include <utility>
(...skipping 3262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3273 } 3273 }
3274 3274
3275 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { 3275 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) {
3276 for (auto& observer : observers_) 3276 for (auto& observer : observers_)
3277 observer.DidFinishNavigation(navigation_handle); 3277 observer.DidFinishNavigation(navigation_handle);
3278 } 3278 }
3279 3279
3280 void WebContentsImpl::DidStartProvisionalLoad( 3280 void WebContentsImpl::DidStartProvisionalLoad(
3281 RenderFrameHostImpl* render_frame_host, 3281 RenderFrameHostImpl* render_frame_host,
3282 const GURL& validated_url, 3282 const GURL& validated_url,
3283 bool is_error_page, 3283 bool is_error_page) {
3284 bool is_iframe_srcdoc) {
3285 // Notify observers about the start of the provisional load. 3284 // Notify observers about the start of the provisional load.
3286 for (auto& observer : observers_) { 3285 for (auto& observer : observers_) {
3287 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, 3286 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url,
3288 is_error_page, is_iframe_srcdoc); 3287 is_error_page);
3289 } 3288 }
3290 3289
3291 // Notify accessibility if this is a reload. 3290 // Notify accessibility if this is a reload.
3292 NavigationEntry* entry = controller_.GetVisibleEntry(); 3291 NavigationEntry* entry = controller_.GetVisibleEntry();
3293 if (entry && ui::PageTransitionCoreTypeIs( 3292 if (entry && ui::PageTransitionCoreTypeIs(entry->GetTransitionType(),
3294 entry->GetTransitionType(), ui::PAGE_TRANSITION_RELOAD)) { 3293 ui::PAGE_TRANSITION_RELOAD)) {
3295 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); 3294 FrameTreeNode* ftn = render_frame_host->frame_tree_node();
3296 BrowserAccessibilityManager* manager = 3295 BrowserAccessibilityManager* manager =
3297 ftn->current_frame_host()->browser_accessibility_manager(); 3296 ftn->current_frame_host()->browser_accessibility_manager();
3298 if (manager) 3297 if (manager)
3299 manager->UserIsReloading(); 3298 manager->UserIsReloading();
3300 } 3299 }
3301 } 3300 }
3302 3301
3303 void WebContentsImpl::DidFailProvisionalLoadWithError( 3302 void WebContentsImpl::DidFailProvisionalLoadWithError(
3304 RenderFrameHostImpl* render_frame_host, 3303 RenderFrameHostImpl* render_frame_host,
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
3555 observer.DocumentLoadedInFrame(rfh); 3554 observer.DocumentLoadedInFrame(rfh);
3556 } 3555 }
3557 3556
3558 void WebContentsImpl::OnDidFinishLoad(const GURL& url) { 3557 void WebContentsImpl::OnDidFinishLoad(const GURL& url) {
3559 if (!HasValidFrameSource()) 3558 if (!HasValidFrameSource())
3560 return; 3559 return;
3561 3560
3562 GURL validated_url(url); 3561 GURL validated_url(url);
3563 RenderProcessHost* render_process_host = 3562 RenderProcessHost* render_process_host =
3564 render_frame_message_source_->GetProcess(); 3563 render_frame_message_source_->GetProcess();
3565 render_process_host->FilterURL(false, &validated_url); 3564 if (validated_url != GURL(content::kAboutSrcDocURL))
nasko 2016/11/15 17:15:23 Remove check.
arthursonzogni 2016/11/17 17:04:58 Done.
3565 render_process_host->FilterURL(false, &validated_url);
3566 3566
3567 RenderFrameHostImpl* rfh = 3567 RenderFrameHostImpl* rfh =
3568 static_cast<RenderFrameHostImpl*>(render_frame_message_source_); 3568 static_cast<RenderFrameHostImpl*>(render_frame_message_source_);
3569 for (auto& observer : observers_) 3569 for (auto& observer : observers_)
3570 observer.DidFinishLoad(rfh, validated_url); 3570 observer.DidFinishLoad(rfh, validated_url);
3571 } 3571 }
3572 3572
3573 void WebContentsImpl::OnGoToEntryAtOffset(int offset) { 3573 void WebContentsImpl::OnGoToEntryAtOffset(int offset) {
3574 if (!delegate_ || delegate_->OnGoToEntryOffset(offset)) 3574 if (!delegate_ || delegate_->OnGoToEntryOffset(offset))
3575 controller_.GoToOffset(offset); 3575 controller_.GoToOffset(offset);
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after
5227 dialog_manager_ = dialog_manager; 5227 dialog_manager_ = dialog_manager;
5228 } 5228 }
5229 5229
5230 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5230 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5231 auto it = binding_sets_.find(interface_name); 5231 auto it = binding_sets_.find(interface_name);
5232 if (it != binding_sets_.end()) 5232 if (it != binding_sets_.end())
5233 binding_sets_.erase(it); 5233 binding_sets_.erase(it);
5234 } 5234 }
5235 5235
5236 } // namespace content 5236 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698