| OLD | NEW |
| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 #include "content/public/browser/web_contents_binding_set.h" | 110 #include "content/public/browser/web_contents_binding_set.h" |
| 111 #include "content/public/browser/web_contents_delegate.h" | 111 #include "content/public/browser/web_contents_delegate.h" |
| 112 #include "content/public/browser/web_contents_unresponsive_state.h" | 112 #include "content/public/browser/web_contents_unresponsive_state.h" |
| 113 #include "content/public/common/bindings_policy.h" | 113 #include "content/public/common/bindings_policy.h" |
| 114 #include "content/public/common/browser_side_navigation_policy.h" | 114 #include "content/public/common/browser_side_navigation_policy.h" |
| 115 #include "content/public/common/child_process_host.h" | 115 #include "content/public/common/child_process_host.h" |
| 116 #include "content/public/common/content_constants.h" | 116 #include "content/public/common/content_constants.h" |
| 117 #include "content/public/common/content_switches.h" | 117 #include "content/public/common/content_switches.h" |
| 118 #include "content/public/common/page_zoom.h" | 118 #include "content/public/common/page_zoom.h" |
| 119 #include "content/public/common/result_codes.h" | 119 #include "content/public/common/result_codes.h" |
| 120 #include "content/public/common/url_constants.h" | |
| 121 #include "content/public/common/url_utils.h" | 120 #include "content/public/common/url_utils.h" |
| 122 #include "content/public/common/web_preferences.h" | 121 #include "content/public/common/web_preferences.h" |
| 123 #include "device/geolocation/geolocation_service_context.h" | 122 #include "device/geolocation/geolocation_service_context.h" |
| 124 #include "device/nfc/nfc.mojom.h" | 123 #include "device/nfc/nfc.mojom.h" |
| 125 #include "device/wake_lock/wake_lock_service_context.h" | 124 #include "device/wake_lock/wake_lock_service_context.h" |
| 126 #include "net/base/url_util.h" | 125 #include "net/base/url_util.h" |
| 127 #include "net/http/http_cache.h" | 126 #include "net/http/http_cache.h" |
| 128 #include "net/http/http_transaction_factory.h" | 127 #include "net/http/http_transaction_factory.h" |
| 129 #include "net/url_request/url_request_context.h" | 128 #include "net/url_request/url_request_context.h" |
| 130 #include "net/url_request/url_request_context_getter.h" | 129 #include "net/url_request/url_request_context_getter.h" |
| (...skipping 3142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3273 } | 3272 } |
| 3274 | 3273 |
| 3275 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { | 3274 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { |
| 3276 for (auto& observer : observers_) | 3275 for (auto& observer : observers_) |
| 3277 observer.DidFinishNavigation(navigation_handle); | 3276 observer.DidFinishNavigation(navigation_handle); |
| 3278 } | 3277 } |
| 3279 | 3278 |
| 3280 void WebContentsImpl::DidStartProvisionalLoad( | 3279 void WebContentsImpl::DidStartProvisionalLoad( |
| 3281 RenderFrameHostImpl* render_frame_host, | 3280 RenderFrameHostImpl* render_frame_host, |
| 3282 const GURL& validated_url, | 3281 const GURL& validated_url, |
| 3283 bool is_error_page, | 3282 bool is_error_page) { |
| 3284 bool is_iframe_srcdoc) { | |
| 3285 // Notify observers about the start of the provisional load. | 3283 // Notify observers about the start of the provisional load. |
| 3286 for (auto& observer : observers_) { | 3284 for (auto& observer : observers_) { |
| 3287 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, | 3285 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, |
| 3288 is_error_page, is_iframe_srcdoc); | 3286 is_error_page); |
| 3289 } | 3287 } |
| 3290 | 3288 |
| 3291 // Notify accessibility if this is a reload. | 3289 // Notify accessibility if this is a reload. |
| 3292 NavigationEntry* entry = controller_.GetVisibleEntry(); | 3290 NavigationEntry* entry = controller_.GetVisibleEntry(); |
| 3293 if (entry && ui::PageTransitionCoreTypeIs( | 3291 if (entry && ui::PageTransitionCoreTypeIs(entry->GetTransitionType(), |
| 3294 entry->GetTransitionType(), ui::PAGE_TRANSITION_RELOAD)) { | 3292 ui::PAGE_TRANSITION_RELOAD)) { |
| 3295 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); | 3293 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); |
| 3296 BrowserAccessibilityManager* manager = | 3294 BrowserAccessibilityManager* manager = |
| 3297 ftn->current_frame_host()->browser_accessibility_manager(); | 3295 ftn->current_frame_host()->browser_accessibility_manager(); |
| 3298 if (manager) | 3296 if (manager) |
| 3299 manager->UserIsReloading(); | 3297 manager->UserIsReloading(); |
| 3300 } | 3298 } |
| 3301 } | 3299 } |
| 3302 | 3300 |
| 3303 void WebContentsImpl::DidFailProvisionalLoadWithError( | 3301 void WebContentsImpl::DidFailProvisionalLoadWithError( |
| 3304 RenderFrameHostImpl* render_frame_host, | 3302 RenderFrameHostImpl* render_frame_host, |
| (...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5227 dialog_manager_ = dialog_manager; | 5225 dialog_manager_ = dialog_manager; |
| 5228 } | 5226 } |
| 5229 | 5227 |
| 5230 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5228 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5231 auto it = binding_sets_.find(interface_name); | 5229 auto it = binding_sets_.find(interface_name); |
| 5232 if (it != binding_sets_.end()) | 5230 if (it != binding_sets_.end()) |
| 5233 binding_sets_.erase(it); | 5231 binding_sets_.erase(it); |
| 5234 } | 5232 } |
| 5235 | 5233 |
| 5236 } // namespace content | 5234 } // namespace content |
| OLD | NEW |