OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_FACADE_DELEGATE_H_ |
| 6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_FACADE_DELEGATE_H_ |
| 7 |
| 8 namespace content { |
| 9 class NavigationController; |
| 10 } |
| 11 |
| 12 namespace web { |
| 13 |
| 14 class NavigationItemImpl; |
| 15 class NavigationManagerImpl; |
| 16 |
| 17 // Interface used by the NavigationManager to drive the NavigationController |
| 18 // facade. This pushes the ownership of the facade out of the web-layer to |
| 19 // simplify upstreaming efforts. Once upstream features are componentized and |
| 20 // use NavigationManager, this class will no longer be necessary. |
| 21 class NavigationManagerFacadeDelegate { |
| 22 public: |
| 23 NavigationManagerFacadeDelegate() {} |
| 24 virtual ~NavigationManagerFacadeDelegate() {} |
| 25 |
| 26 // Sets the NavigationManagerImpl that backs the NavigationController facade. |
| 27 virtual void SetNavigationManager( |
| 28 NavigationManagerImpl* navigation_manager) = 0; |
| 29 // Returns the facade object being driven by this delegate. |
| 30 virtual content::NavigationController* GetNavigationControllerFacade() = 0; |
| 31 |
| 32 // Callbacks for triggering notifications: |
| 33 |
| 34 // Called when the NavigationManager has a pending NavigationItem. |
| 35 virtual void OnNavigationItemPending() = 0; |
| 36 // Called when the NavigationManager has updated a NavigationItem. |
| 37 virtual void OnNavigationItemChanged() = 0; |
| 38 // Called when the NavigationManager has committed a pending NavigationItem. |
| 39 virtual void OnNavigationItemCommitted(int previous_item_index, |
| 40 bool is_in_page) = 0; |
| 41 // Called when the NavigationManager has pruned committed NavigationItems. |
| 42 virtual void OnNavigationItemsPruned(size_t pruned_item_count) = 0; |
| 43 }; |
| 44 |
| 45 } // namespace web |
| 46 |
| 47 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_FACADE_DELEGATE_H_ |
OLD | NEW |