| 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 <memory> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #import "base/mac/scoped_nsobject.h" | 13 #import "base/mac/scoped_nsobject.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/scoped_vector.h" | |
| 16 #import "ios/web/public/navigation_manager.h" | 15 #import "ios/web/public/navigation_manager.h" |
| 17 #include "ui/base/page_transition_types.h" | 16 #include "ui/base/page_transition_types.h" |
| 18 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 19 | 18 |
| 20 @class CRWSessionController; | 19 @class CRWSessionController; |
| 21 | 20 |
| 22 namespace web { | 21 namespace web { |
| 23 class BrowserState; | 22 class BrowserState; |
| 24 class NavigationItem; | 23 class NavigationItem; |
| 25 struct Referrer; | 24 struct Referrer; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 50 // |opener_index| is the navigation index of the opener, or -1 if there is | 49 // |opener_index| is the navigation index of the opener, or -1 if there is |
| 51 // none. | 50 // none. |
| 52 void InitializeSession(NSString* window_name, | 51 void InitializeSession(NSString* window_name, |
| 53 NSString* opener_id, | 52 NSString* opener_id, |
| 54 BOOL opened_by_dom, | 53 BOOL opened_by_dom, |
| 55 int opener_navigation_index); | 54 int opener_navigation_index); |
| 56 | 55 |
| 57 // Replace the session history with a new one, where |items| is the | 56 // Replace the session history with a new one, where |items| is the |
| 58 // complete set of navigation items in the new history, and |current_index| | 57 // complete set of navigation items in the new history, and |current_index| |
| 59 // is the index of the currently active item. | 58 // is the index of the currently active item. |
| 60 void ReplaceSessionHistory(ScopedVector<NavigationItem> items, | 59 void ReplaceSessionHistory(std::vector<std::unique_ptr<NavigationItem>> items, |
| 61 int current_index); | 60 int current_index); |
| 62 | 61 |
| 63 // Sets the delegate used to drive the navigation controller facade. | 62 // Sets the delegate used to drive the navigation controller facade. |
| 64 void SetFacadeDelegate(NavigationManagerFacadeDelegate* facade_delegate); | 63 void SetFacadeDelegate(NavigationManagerFacadeDelegate* facade_delegate); |
| 65 NavigationManagerFacadeDelegate* GetFacadeDelegate() const; | 64 NavigationManagerFacadeDelegate* GetFacadeDelegate() const; |
| 66 | 65 |
| 67 // Helper functions for communicating with the facade layer. | 66 // Helper functions for communicating with the facade layer. |
| 68 // TODO(stuartmorgan): Make these private once the logic triggering them moves | 67 // TODO(stuartmorgan): Make these private once the logic triggering them moves |
| 69 // into this layer. | 68 // into this layer. |
| 70 void OnNavigationItemsPruned(size_t pruned_item_count); | 69 void OnNavigationItemsPruned(size_t pruned_item_count); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 // List of transient url rewriters added by |AddTransientURLRewriter()|. | 158 // List of transient url rewriters added by |AddTransientURLRewriter()|. |
| 160 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> | 159 std::unique_ptr<std::vector<BrowserURLRewriter::URLRewriter>> |
| 161 transient_url_rewriters_; | 160 transient_url_rewriters_; |
| 162 | 161 |
| 163 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); | 162 DISALLOW_COPY_AND_ASSIGN(NavigationManagerImpl); |
| 164 }; | 163 }; |
| 165 | 164 |
| 166 } // namespace web | 165 } // namespace web |
| 167 | 166 |
| 168 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ | 167 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_IMPL_H_ |
| OLD | NEW |