| 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/frame_tree_node.h" | 12 #include "content/browser/frame_host/frame_tree_node.h" |
| 15 #include "content/browser/frame_host/navigator.h" | 13 #include "content/browser/frame_host/navigator.h" |
| 16 #include "content/browser/frame_host/navigator_delegate.h" | 14 #include "content/browser/frame_host/navigator_delegate.h" |
| 17 #include "content/browser/service_worker/service_worker_context_wrapper.h" | 15 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 18 #include "content/browser/service_worker/service_worker_navigation_handle.h" | 16 #include "content/browser/service_worker/service_worker_navigation_handle.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 params.page_state = PageState::CreateFromURL(url); | 362 params.page_state = PageState::CreateFromURL(url); |
| 365 params.contents_mime_type = std::string("text/html"); | 363 params.contents_mime_type = std::string("text/html"); |
| 366 | 364 |
| 367 DidCommitNavigation(params, false, render_frame_host_); | 365 DidCommitNavigation(params, false, render_frame_host_); |
| 368 } | 366 } |
| 369 | 367 |
| 370 NavigationData* NavigationHandleImpl::GetNavigationData() { | 368 NavigationData* NavigationHandleImpl::GetNavigationData() { |
| 371 return navigation_data_.get(); | 369 return navigation_data_.get(); |
| 372 } | 370 } |
| 373 | 371 |
| 372 const GlobalRequestID& NavigationHandleImpl::GetGlobalRequestID() { |
| 373 DCHECK(state_ == WILL_PROCESS_RESPONSE || state_ == DEFERRING_RESPONSE || |
| 374 state_ == READY_TO_COMMIT); |
| 375 return request_id_; |
| 376 } |
| 377 |
| 374 void NavigationHandleImpl::InitServiceWorkerHandle( | 378 void NavigationHandleImpl::InitServiceWorkerHandle( |
| 375 ServiceWorkerContextWrapper* service_worker_context) { | 379 ServiceWorkerContextWrapper* service_worker_context) { |
| 376 DCHECK(IsBrowserSideNavigationEnabled()); | 380 DCHECK(IsBrowserSideNavigationEnabled()); |
| 377 service_worker_handle_.reset( | 381 service_worker_handle_.reset( |
| 378 new ServiceWorkerNavigationHandle(service_worker_context)); | 382 new ServiceWorkerNavigationHandle(service_worker_context)); |
| 379 } | 383 } |
| 380 | 384 |
| 381 void NavigationHandleImpl::WillStartRequest( | 385 void NavigationHandleImpl::WillStartRequest( |
| 382 const std::string& method, | 386 const std::string& method, |
| 383 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, | 387 scoped_refptr<content::ResourceRequestBodyImpl> resource_request_body, |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 throttles_to_register.end()); | 759 throttles_to_register.end()); |
| 756 throttles_to_register.weak_clear(); | 760 throttles_to_register.weak_clear(); |
| 757 } | 761 } |
| 758 } | 762 } |
| 759 | 763 |
| 760 bool NavigationHandleImpl::WasStartedFromContextMenu() const { | 764 bool NavigationHandleImpl::WasStartedFromContextMenu() const { |
| 761 return started_from_context_menu_; | 765 return started_from_context_menu_; |
| 762 } | 766 } |
| 763 | 767 |
| 764 } // namespace content | 768 } // namespace content |
| OLD | NEW |