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

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

Issue 2541063002: Revert of Remove about:srcdoc url conversion. (Closed)
Patch Set: Created 4 years 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #include "content/public/browser/web_contents_binding_set.h" 111 #include "content/public/browser/web_contents_binding_set.h"
112 #include "content/public/browser/web_contents_delegate.h" 112 #include "content/public/browser/web_contents_delegate.h"
113 #include "content/public/browser/web_contents_unresponsive_state.h" 113 #include "content/public/browser/web_contents_unresponsive_state.h"
114 #include "content/public/common/bindings_policy.h" 114 #include "content/public/common/bindings_policy.h"
115 #include "content/public/common/browser_side_navigation_policy.h" 115 #include "content/public/common/browser_side_navigation_policy.h"
116 #include "content/public/common/child_process_host.h" 116 #include "content/public/common/child_process_host.h"
117 #include "content/public/common/content_constants.h" 117 #include "content/public/common/content_constants.h"
118 #include "content/public/common/content_switches.h" 118 #include "content/public/common/content_switches.h"
119 #include "content/public/common/page_zoom.h" 119 #include "content/public/common/page_zoom.h"
120 #include "content/public/common/result_codes.h" 120 #include "content/public/common/result_codes.h"
121 #include "content/public/common/url_constants.h"
121 #include "content/public/common/url_utils.h" 122 #include "content/public/common/url_utils.h"
122 #include "content/public/common/web_preferences.h" 123 #include "content/public/common/web_preferences.h"
123 #include "device/geolocation/geolocation_service_context.h" 124 #include "device/geolocation/geolocation_service_context.h"
124 #include "device/nfc/nfc.mojom.h" 125 #include "device/nfc/nfc.mojom.h"
125 #include "device/wake_lock/wake_lock_service_context.h" 126 #include "device/wake_lock/wake_lock_service_context.h"
126 #include "net/base/url_util.h" 127 #include "net/base/url_util.h"
127 #include "net/http/http_cache.h" 128 #include "net/http/http_cache.h"
128 #include "net/http/http_transaction_factory.h" 129 #include "net/http/http_transaction_factory.h"
129 #include "net/url_request/url_request_context.h" 130 #include "net/url_request/url_request_context.h"
130 #include "net/url_request/url_request_context_getter.h" 131 #include "net/url_request/url_request_context_getter.h"
(...skipping 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after
3278 } 3279 }
3279 3280
3280 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { 3281 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) {
3281 for (auto& observer : observers_) 3282 for (auto& observer : observers_)
3282 observer.DidFinishNavigation(navigation_handle); 3283 observer.DidFinishNavigation(navigation_handle);
3283 } 3284 }
3284 3285
3285 void WebContentsImpl::DidStartProvisionalLoad( 3286 void WebContentsImpl::DidStartProvisionalLoad(
3286 RenderFrameHostImpl* render_frame_host, 3287 RenderFrameHostImpl* render_frame_host,
3287 const GURL& validated_url, 3288 const GURL& validated_url,
3288 bool is_error_page) { 3289 bool is_error_page,
3290 bool is_iframe_srcdoc) {
3289 // Notify observers about the start of the provisional load. 3291 // Notify observers about the start of the provisional load.
3290 for (auto& observer : observers_) { 3292 for (auto& observer : observers_) {
3291 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, 3293 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url,
3292 is_error_page); 3294 is_error_page, is_iframe_srcdoc);
3293 } 3295 }
3294 3296
3295 // Notify accessibility if this is a reload. 3297 // Notify accessibility if this is a reload.
3296 NavigationEntry* entry = controller_.GetVisibleEntry(); 3298 NavigationEntry* entry = controller_.GetVisibleEntry();
3297 if (entry && ui::PageTransitionCoreTypeIs(entry->GetTransitionType(), 3299 if (entry && ui::PageTransitionCoreTypeIs(
3298 ui::PAGE_TRANSITION_RELOAD)) { 3300 entry->GetTransitionType(), ui::PAGE_TRANSITION_RELOAD)) {
3299 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); 3301 FrameTreeNode* ftn = render_frame_host->frame_tree_node();
3300 BrowserAccessibilityManager* manager = 3302 BrowserAccessibilityManager* manager =
3301 ftn->current_frame_host()->browser_accessibility_manager(); 3303 ftn->current_frame_host()->browser_accessibility_manager();
3302 if (manager) 3304 if (manager)
3303 manager->UserIsReloading(); 3305 manager->UserIsReloading();
3304 } 3306 }
3305 } 3307 }
3306 3308
3307 void WebContentsImpl::DidFailProvisionalLoadWithError( 3309 void WebContentsImpl::DidFailProvisionalLoadWithError(
3308 RenderFrameHostImpl* render_frame_host, 3310 RenderFrameHostImpl* render_frame_host,
(...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after
5274 dialog_manager_ = dialog_manager; 5276 dialog_manager_ = dialog_manager;
5275 } 5277 }
5276 5278
5277 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { 5279 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) {
5278 auto it = binding_sets_.find(interface_name); 5280 auto it = binding_sets_.find(interface_name);
5279 if (it != binding_sets_.end()) 5281 if (it != binding_sets_.end())
5280 binding_sets_.erase(it); 5282 binding_sets_.erase(it);
5281 } 5283 }
5282 5284
5283 } // namespace content 5285 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_impl_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698