Chromium Code Reviews| 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 "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 static scoped_ptr<NavigationHandleImpl> Create(const GURL& url, | 55 static scoped_ptr<NavigationHandleImpl> Create(const GURL& url, |
| 56 const bool is_main_frame, | 56 const bool is_main_frame, |
| 57 NavigatorDelegate* delegate); | 57 NavigatorDelegate* delegate); |
| 58 | 58 |
| 59 ~NavigationHandleImpl() override; | 59 ~NavigationHandleImpl() override; |
| 60 | 60 |
| 61 // NavigationHandle implementation: | 61 // NavigationHandle implementation: |
| 62 const GURL& GetURL() const override; | 62 const GURL& GetURL() const override; |
| 63 net::Error GetNetErrorCode() const override; | 63 net::Error GetNetErrorCode() const override; |
| 64 bool IsInMainFrame() const override; | 64 bool IsInMainFrame() const override; |
| 65 bool IsSamePage() const override; | |
| 65 bool HasCommittedDocument() const override; | 66 bool HasCommittedDocument() const override; |
| 66 bool HasCommittedErrorPage() const override; | 67 bool HasCommittedErrorPage() const override; |
| 67 | 68 |
| 69 void set_is_same_page(bool is_same_page) { | |
|
clamy
2015/09/08 13:25:58
Instead of a setter, I would rather have set_is_sa
Charlie Harrison
2015/09/08 23:05:15
Done.
| |
| 70 is_same_page_ = is_same_page; | |
| 71 } | |
| 72 | |
| 68 void set_net_error_code(net::Error net_error_code) { | 73 void set_net_error_code(net::Error net_error_code) { |
| 69 net_error_code_ = net_error_code; | 74 net_error_code_ = net_error_code; |
| 70 } | 75 } |
| 71 | 76 |
| 72 // Returns whether the navigation is currently being transferred from one | 77 // Returns whether the navigation is currently being transferred from one |
| 73 // RenderFrameHost to another. In particular, a DidStartProvisionalLoad IPC | 78 // RenderFrameHost to another. In particular, a DidStartProvisionalLoad IPC |
| 74 // for the navigation URL, received in the new RenderFrameHost, should not | 79 // for the navigation URL, received in the new RenderFrameHost, should not |
| 75 // indicate the start of a new navigation in that case. | 80 // indicate the start of a new navigation in that case. |
| 76 bool is_transferring() const { return is_transferring_; } | 81 bool is_transferring() const { return is_transferring_; } |
| 77 void set_is_transferring(bool is_transferring) { | 82 void set_is_transferring(bool is_transferring) { |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 97 NavigationHandleImpl(const GURL& url, | 102 NavigationHandleImpl(const GURL& url, |
| 98 const bool is_main_frame, | 103 const bool is_main_frame, |
| 99 NavigatorDelegate* delegate); | 104 NavigatorDelegate* delegate); |
| 100 | 105 |
| 101 // See NavigationHandle for a description of those member variables. | 106 // See NavigationHandle for a description of those member variables. |
| 102 GURL url_; | 107 GURL url_; |
| 103 net::Error net_error_code_; | 108 net::Error net_error_code_; |
| 104 State state_; | 109 State state_; |
| 105 const bool is_main_frame_; | 110 const bool is_main_frame_; |
| 106 | 111 |
| 112 // Whether the navigation resulted in a same-page navigation | |
|
clamy
2015/09/08 13:25:58
I would replace with "Whether the navigation happe
Charlie Harrison
2015/09/08 23:05:16
Done.
| |
| 113 bool is_same_page_; | |
| 114 | |
| 107 // Whether the navigation is in the middle of a transfer. Set to false when | 115 // Whether the navigation is in the middle of a transfer. Set to false when |
| 108 // the DidStartProvisionalLoad is received from the new renderer. | 116 // the DidStartProvisionalLoad is received from the new renderer. |
| 109 bool is_transferring_; | 117 bool is_transferring_; |
| 110 | 118 |
| 111 // The delegate that should be notified about events related to this | 119 // The delegate that should be notified about events related to this |
| 112 // navigation. | 120 // navigation. |
| 113 NavigatorDelegate* delegate_; | 121 NavigatorDelegate* delegate_; |
| 114 | 122 |
| 115 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); | 123 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |
| 116 }; | 124 }; |
| 117 | 125 |
| 118 } // namespace content | 126 } // namespace content |
| 119 | 127 |
| 120 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ | 128 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ |
| OLD | NEW |