| 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 3151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3283 } | 3282 } |
| 3284 | 3283 |
| 3285 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { | 3284 void WebContentsImpl::DidFinishNavigation(NavigationHandle* navigation_handle) { |
| 3286 for (auto& observer : observers_) | 3285 for (auto& observer : observers_) |
| 3287 observer.DidFinishNavigation(navigation_handle); | 3286 observer.DidFinishNavigation(navigation_handle); |
| 3288 } | 3287 } |
| 3289 | 3288 |
| 3290 void WebContentsImpl::DidStartProvisionalLoad( | 3289 void WebContentsImpl::DidStartProvisionalLoad( |
| 3291 RenderFrameHostImpl* render_frame_host, | 3290 RenderFrameHostImpl* render_frame_host, |
| 3292 const GURL& validated_url, | 3291 const GURL& validated_url, |
| 3293 bool is_error_page, | 3292 bool is_error_page) { |
| 3294 bool is_iframe_srcdoc) { | |
| 3295 // Notify observers about the start of the provisional load. | 3293 // Notify observers about the start of the provisional load. |
| 3296 for (auto& observer : observers_) { | 3294 for (auto& observer : observers_) { |
| 3297 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, | 3295 observer.DidStartProvisionalLoadForFrame(render_frame_host, validated_url, |
| 3298 is_error_page, is_iframe_srcdoc); | 3296 is_error_page); |
| 3299 } | 3297 } |
| 3300 | 3298 |
| 3301 // Notify accessibility if this is a reload. | 3299 // Notify accessibility if this is a reload. |
| 3302 NavigationEntry* entry = controller_.GetVisibleEntry(); | 3300 NavigationEntry* entry = controller_.GetVisibleEntry(); |
| 3303 if (entry && ui::PageTransitionCoreTypeIs( | 3301 if (entry && ui::PageTransitionCoreTypeIs(entry->GetTransitionType(), |
| 3304 entry->GetTransitionType(), ui::PAGE_TRANSITION_RELOAD)) { | 3302 ui::PAGE_TRANSITION_RELOAD)) { |
| 3305 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); | 3303 FrameTreeNode* ftn = render_frame_host->frame_tree_node(); |
| 3306 BrowserAccessibilityManager* manager = | 3304 BrowserAccessibilityManager* manager = |
| 3307 ftn->current_frame_host()->browser_accessibility_manager(); | 3305 ftn->current_frame_host()->browser_accessibility_manager(); |
| 3308 if (manager) | 3306 if (manager) |
| 3309 manager->UserIsReloading(); | 3307 manager->UserIsReloading(); |
| 3310 } | 3308 } |
| 3311 } | 3309 } |
| 3312 | 3310 |
| 3313 void WebContentsImpl::DidFailProvisionalLoadWithError( | 3311 void WebContentsImpl::DidFailProvisionalLoadWithError( |
| 3314 RenderFrameHostImpl* render_frame_host, | 3312 RenderFrameHostImpl* render_frame_host, |
| (...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5280 dialog_manager_ = dialog_manager; | 5278 dialog_manager_ = dialog_manager; |
| 5281 } | 5279 } |
| 5282 | 5280 |
| 5283 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { | 5281 void WebContentsImpl::RemoveBindingSet(const std::string& interface_name) { |
| 5284 auto it = binding_sets_.find(interface_name); | 5282 auto it = binding_sets_.find(interface_name); |
| 5285 if (it != binding_sets_.end()) | 5283 if (it != binding_sets_.end()) |
| 5286 binding_sets_.erase(it); | 5284 binding_sets_.erase(it); |
| 5287 } | 5285 } |
| 5288 | 5286 |
| 5289 } // namespace content | 5287 } // namespace content |
| OLD | NEW |