OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
| 10 #include <memory> |
10 #include <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/mac/scoped_nsobject.h" | 13 #include "base/mac/scoped_nsobject.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
16 #import "ios/web/public/navigation_manager.h" | 16 #import "ios/web/public/navigation_manager.h" |
17 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" |
18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
19 | 19 |
20 @class CRWSessionController; | 20 @class CRWSessionController; |
21 @class CRWSessionEntry; | 21 @class CRWSessionEntry; |
22 | 22 |
23 namespace web { | 23 namespace web { |
24 class BrowserState; | 24 class BrowserState; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 bool CanGoBack() const override; | 113 bool CanGoBack() const override; |
114 bool CanGoForward() const override; | 114 bool CanGoForward() const override; |
115 void GoBack() override; | 115 void GoBack() override; |
116 void GoForward() override; | 116 void GoForward() override; |
117 void Reload(bool check_for_reposts) override; | 117 void Reload(bool check_for_reposts) override; |
118 | 118 |
119 // Returns the current list of transient url rewriters, passing ownership to | 119 // Returns the current list of transient url rewriters, passing ownership to |
120 // the caller. | 120 // the caller. |
121 // TODO(crbug.com/546197): remove once NavigationItem creation occurs in this | 121 // TODO(crbug.com/546197): remove once NavigationItem creation occurs in this |
122 // class. | 122 // class. |
123 scoped_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 123 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
124 GetTransientURLRewriters(); | 124 GetTransientURLRewriters(); |
125 | 125 |
126 // Called to reset the transient url rewriter list. | 126 // Called to reset the transient url rewriter list. |
127 void RemoveTransientURLRewriters(); | 127 void RemoveTransientURLRewriters(); |
128 | 128 |
129 // Copy state from |navigation_manager|, including a copy of that object's | 129 // Copy state from |navigation_manager|, including a copy of that object's |
130 // CRWSessionController. | 130 // CRWSessionController. |
131 void CopyState(NavigationManagerImpl* navigation_manager); | 131 void CopyState(NavigationManagerImpl* navigation_manager); |
132 | 132 |
133 private: | 133 private: |
134 // The primary delegate for this manager. | 134 // The primary delegate for this manager. |
135 NavigationManagerDelegate* delegate_; | 135 NavigationManagerDelegate* delegate_; |
136 | 136 |
137 // The BrowserState that is associated with this instance. | 137 // The BrowserState that is associated with this instance. |
138 BrowserState* browser_state_; | 138 BrowserState* browser_state_; |
139 | 139 |
140 // CRWSessionController that backs this instance. | 140 // CRWSessionController that backs this instance. |
141 // TODO(stuartmorgan): Fold CRWSessionController into this class. | 141 // TODO(stuartmorgan): Fold CRWSessionController into this class. |
142 base::scoped_nsobject<CRWSessionController> session_controller_; | 142 base::scoped_nsobject<CRWSessionController> session_controller_; |
143 | 143 |
144 // Weak pointer to the facade delegate. | 144 // Weak pointer to the facade delegate. |
145 NavigationManagerFacadeDelegate* facade_delegate_; | 145 NavigationManagerFacadeDelegate* facade_delegate_; |
146 | 146 |
147 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 147 // List of transient url rewriters added by |AddTransientURLRewriter()|. |
148 scoped_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 148 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
149 transient_url_rewriters_; | 149 transient_url_rewriters_; |
150 | 150 |
151 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 151 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); |
152 }; | 152 }; |
153 | 153 |
154 } // namespace web | 154 } // namespace web |
155 | 155 |
156 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 156 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
OLD | NEW |