| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/frame_host/navigation_handle_impl.h" | 5 #include "content/browser/frame_host/navigation_handle_impl.h" |
| 6 | 6 |
| 7 #include <utility> | |
| 8 | |
| 9 #include "base/debug/dump_without_crashing.h" | 7 #include "base/debug/dump_without_crashing.h" |
| 10 #include "base/logging.h" | 8 #include "base/logging.h" |
| 11 #include "content/browser/browsing_data/clear_site_data_throttle.h" | 9 #include "content/browser/browsing_data/clear_site_data_throttle.h" |
| 12 #include "content/browser/child_process_security_policy_impl.h" | 10 #include "content/browser/child_process_security_policy_impl.h" |
| 13 #include "content/browser/devtools/render_frame_devtools_agent_host.h" | 11 #include "content/browser/devtools/render_frame_devtools_agent_host.h" |
| 14 #include "content/browser/frame_host/debug_urls.h" | 12 #include "content/browser/frame_host/debug_urls.h" |
| 15 #include "content/browser/frame_host/frame_tree_node.h" | 13 #include "content/browser/frame_host/frame_tree_node.h" |
| 16 #include "content/browser/frame_host/navigator.h" | 14 #include "content/browser/frame_host/navigator.h" |
| 17 #include "content/browser/frame_host/navigator_delegate.h" | 15 #include "content/browser/frame_host/navigator_delegate.h" |
| 18 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 16 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 } | 377 } |
| 380 | 378 |
| 381 const std::string& NavigationHandleImpl::GetSearchableFormEncoding() { | 379 const std::string& NavigationHandleImpl::GetSearchableFormEncoding() { |
| 382 return searchable_form_encoding_; | 380 return searchable_form_encoding_; |
| 383 } | 381 } |
| 384 | 382 |
| 385 NavigationData* NavigationHandleImpl::GetNavigationData() { | 383 NavigationData* NavigationHandleImpl::GetNavigationData() { |
| 386 return navigation_data_.get(); | 384 return navigation_data_.get(); |
| 387 } | 385 } |
| 388 | 386 |
| 387 const GlobalRequestID& NavigationHandleImpl::GetGlobalRequestID() { |
| 388 DCHECK(state_ == WILL_PROCESS_RESPONSE || state_ == DEFERRING_RESPONSE || |
| 389 state_ == READY_TO_COMMIT); |
| 390 return request_id_; |
| 391 } |
| 392 |
| 389 void NavigationHandleImpl::InitServiceWorkerHandle( | 393 void NavigationHandleImpl::InitServiceWorkerHandle( |
| 390 ServiceWorkerContextWrapper* service_worker_context) { | 394 ServiceWorkerContextWrapper* service_worker_context) { |
| 391 DCHECK(IsBrowserSideNavigationEnabled()); | 395 DCHECK(IsBrowserSideNavigationEnabled()); |
| 392 service_worker_handle_.reset( | 396 service_worker_handle_.reset( |
| 393 new ServiceWorkerNavigationHandle(service_worker_context)); | 397 new ServiceWorkerNavigationHandle(service_worker_context)); |
| 394 } | 398 } |
| 395 | 399 |
| 396 void NavigationHandleImpl::WillStartRequest( | 400 void NavigationHandleImpl::WillStartRequest( |
| 397 const std::string& method, | 401 const std::string& method, |
| 398 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, | 402 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 throttles_to_register.push_back(std::move(clear_site_data_throttle)); | 771 throttles_to_register.push_back(std::move(clear_site_data_throttle)); |
| 768 | 772 |
| 769 if (throttles_to_register.size() > 0) { | 773 if (throttles_to_register.size() > 0) { |
| 770 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), | 774 throttles_.insert(throttles_.begin(), throttles_to_register.begin(), |
| 771 throttles_to_register.end()); | 775 throttles_to_register.end()); |
| 772 throttles_to_register.weak_clear(); | 776 throttles_to_register.weak_clear(); |
| 773 } | 777 } |
| 774 } | 778 } |
| 775 | 779 |
| 776 } // namespace content | 780 } // namespace content |
| OLD | NEW |