| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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" | |
| 122 #include "content/public/common/url_utils.h" | 121 #include "content/public/common/url_utils.h" |
| 123 #include "content/public/common/web_preferences.h" | 122 #include "content/public/common/web_preferences.h" |
| 124 #include "device/geolocation/geolocation_service_context.h" | 123 #include "device/geolocation/geolocation_service_context.h" |
| 125 #include "device/nfc/nfc.mojom.h" | 124 #include "device/nfc/nfc.mojom.h" |
| 126 #include "device/wake_lock/wake_lock_service_context.h" | 125 #include "device/wake_lock/wake_lock_service_context.h" |
| 127 #include "net/base/url_util.h" | 126 #include "net/base/url_util.h" |
| 128 #include "net/http/http_cache.h" | 127 #include "net/http/http_cache.h" |
| 129 #include "net/http/http_transaction_factory.h" | 128 #include "net/http/http_transaction_factory.h" |
| 130 #include "net/url_request/url_request_context.h" | 129 #include "net/url_request/url_request_context.h" |
| 131 #include "net/url_request/url_request_context_getter.h" | 130 #include "net/url_request/url_request_context_getter.h" |
| (...skipping 3147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3279 } | 3278 } |
| 3280 | 3279 |
| 3281 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { | 3280 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { |
| 3282 for (auto& observer : observers_) | 3281 for (auto& observer : observers_) |
| 3283 observer.DidFinishNavigation(navigation_handle); | 3282 observer.DidFinishNavigation(navigation_handle); |
| 3284 } | 3283 } |
| 3285 | 3284 |
| 3286 void WebContentsImpl::DidStartProvisionalLoad( | 3285 void WebContentsImpl::DidStartProvisionalLoad( |
| 3287 RenderFrameHostImpl* render_frame_host, | 3286 RenderFrameHostImpl* render_frame_host, |
| 3288 const GURL& validated_url, | 3287 const GURL& validated_url, |
| 3289 bool is_error_page, | 3288 bool is_error_page) { |
| 3290 bool is_iframe_srcdoc) { | |
| 3291 // Notify observers about the start of the provisional load. | 3289 // Notify observers about the start of the provisional load. |
| 3292 for (auto& observer : observers_) { | 3290 for (auto& observer : observers_) { |
| 3293 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, | 3291 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, |
| 3294 is_error_page, is_iframe_srcdoc); | 3292 is_error_page); |
| 3295 } | 3293 } |
| 3296 | 3294 |
| 3297 // Notify accessibility if this is a reload. | 3295 // Notify accessibility if this is a reload. |
| 3298 NavigationEntry* entry = controller_.GetVisibleEntry(); | 3296 NavigationEntry* entry = controller_.GetVisibleEntry(); |
| 3299 if (entry && ui::PageTransitionCoreTypeIs( | 3297 if (entry && ui::PageTransitionCoreTypeIs(entry->GetTransitionType(), |
| 3300 entry->GetTransitionType(), ui::PAGE_TRANSITION_RELOAD)) { | 3298 ui::PAGE_TRANSITION_RELOAD)) { |
| 3301 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); | 3299 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); |
| 3302 BrowserAccessibilityManager* manager = | 3300 BrowserAccessibilityManager* manager = |
| 3303 ftn->current_frame_host()->browser_accessibility_manager(); | 3301 ftn->current_frame_host()->browser_accessibility_manager(); |
| 3304 if (manager) | 3302 if (manager) |
| 3305 manager->UserIsReloading(); | 3303 manager->UserIsReloading(); |
| 3306 } | 3304 } |
| 3307 } | 3305 } |
| 3308 | 3306 |
| 3309 void WebContentsImpl::DidFailProvisionalLoadWithError( | 3307 void WebContentsImpl::DidFailProvisionalLoadWithError( |
| 3310 RenderFrameHostImpl* render_frame_host, | 3308 RenderFrameHostImpl* render_frame_host, |
| (...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5276 dialog_manager_ = dialog_manager; | 5274 dialog_manager_ = dialog_manager; |
| 5277 } | 5275 } |
| 5278 | 5276 |
| 5279 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5277 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5280 auto it = binding_sets_.find(interface_name); | 5278 auto it = binding_sets_.find(interface_name); |
| 5281 if (it != binding_sets_.end()) | 5279 if (it != binding_sets_.end()) |
| 5282 binding_sets_.erase(it); | 5280 binding_sets_.erase(it); |
| 5283 } | 5281 } |
| 5284 | 5282 |
| 5285 } // namespace content | 5283 } // namespace content |
| OLD | NEW |