| 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 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| 7 | 7 |
| 8 #include "content/public/browser/navigation_handle.h" | 8 #include "content/public/browser/navigation_handle.h" |
| 9 | 9 |
| 10 #include <stddef.h> | 10 #include <stddef.h> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 bool IsPost() override; | 104 bool IsPost() override; |
| 105 const Referrer& GetReferrer() override; | 105 const Referrer& GetReferrer() override; |
| 106 bool HasUserGesture() override; | 106 bool HasUserGesture() override; |
| 107 ui::PageTransition GetPageTransition() override; | 107 ui::PageTransition GetPageTransition() override; |
| 108 bool IsExternalProtocol() override; | 108 bool IsExternalProtocol() override; |
| 109 net::Error GetNetErrorCode() override; | 109 net::Error GetNetErrorCode() override; |
| 110 RenderFrameHostImpl* GetRenderFrameHost() override; | 110 RenderFrameHostImpl* GetRenderFrameHost() override; |
| 111 bool IsSamePage() override; | 111 bool IsSamePage() override; |
| 112 bool HasCommitted() override; | 112 bool HasCommitted() override; |
| 113 bool IsErrorPage() override; | 113 bool IsErrorPage() override; |
| 114 net::HostPortPair GetSocketAddress() override; |
| 114 const net::HttpResponseHeaders* GetResponseHeaders() override; | 115 const net::HttpResponseHeaders* GetResponseHeaders() override; |
| 115 net::HttpResponseInfo::ConnectionInfo GetConnectionInfo() override; | 116 net::HttpResponseInfo::ConnectionInfo GetConnectionInfo() override; |
| 116 void Resume() override; | 117 void Resume() override; |
| 117 void CancelDeferredNavigation( | 118 void CancelDeferredNavigation( |
| 118 NavigationThrottle::ThrottleCheckResult result) override; | 119 NavigationThrottle::ThrottleCheckResult result) override; |
| 119 void RegisterThrottleForTesting( | 120 void RegisterThrottleForTesting( |
| 120 std::unique_ptr<NavigationThrottle> navigation_throttle) override; | 121 std::unique_ptr<NavigationThrottle> navigation_throttle) override; |
| 121 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( | 122 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( |
| 122 bool is_post, | 123 bool is_post, |
| 123 const Referrer& sanitized_referrer, | 124 const Referrer& sanitized_referrer, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 291 |
| 291 SSLStatus ssl_status() { return ssl_status_; } | 292 SSLStatus ssl_status() { return ssl_status_; } |
| 292 | 293 |
| 293 // Called when the navigation is transferred to a different renderer. | 294 // Called when the navigation is transferred to a different renderer. |
| 294 void Transfer(); | 295 void Transfer(); |
| 295 | 296 |
| 296 NavigationUIData* navigation_ui_data() const { | 297 NavigationUIData* navigation_ui_data() const { |
| 297 return navigation_ui_data_.get(); | 298 return navigation_ui_data_.get(); |
| 298 } | 299 } |
| 299 | 300 |
| 301 const GURL& base_url() { return base_url_; } |
| 302 |
| 300 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } | 303 void set_searchable_form_url(const GURL& url) { searchable_form_url_ = url; } |
| 301 void set_searchable_form_encoding(const std::string& encoding) { | 304 void set_searchable_form_encoding(const std::string& encoding) { |
| 302 searchable_form_encoding_ = encoding; | 305 searchable_form_encoding_ = encoding; |
| 303 } | 306 } |
| 304 | 307 |
| 305 private: | 308 private: |
| 306 friend class NavigationHandleImplTest; | 309 friend class NavigationHandleImplTest; |
| 307 | 310 |
| 308 // Used to track the state the navigation is currently in. | 311 // Used to track the state the navigation is currently in. |
| 309 enum State { | 312 enum State { |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 454 |
| 452 // False by default unless the navigation started within a context menu. | 455 // False by default unless the navigation started within a context menu. |
| 453 bool started_from_context_menu_; | 456 bool started_from_context_menu_; |
| 454 | 457 |
| 455 // Stores the reload type, or NONE if it's not a reload. | 458 // Stores the reload type, or NONE if it's not a reload. |
| 456 ReloadType reload_type_; | 459 ReloadType reload_type_; |
| 457 | 460 |
| 458 GURL searchable_form_url_; | 461 GURL searchable_form_url_; |
| 459 std::string searchable_form_encoding_; | 462 std::string searchable_form_encoding_; |
| 460 | 463 |
| 464 GURL base_url_; |
| 465 net::HostPortPair socket_address_; |
| 466 |
| 461 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; | 467 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
| 462 | 468 |
| 463 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 469 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 464 }; | 470 }; |
| 465 | 471 |
| 466 } // namespace content | 472 } // namespace content |
| 467 | 473 |
| 468 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 474 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |