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