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.
5 #ifndef IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_FACADE_DELEGATE_H_
6 #define IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_FACADE_DELEGATE_H_
9 class NavigationController
;
14 class NavigationItemImpl
;
15 class NavigationManagerImpl
;
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
{
23 NavigationManagerFacadeDelegate() {}
24 virtual ~NavigationManagerFacadeDelegate() {}
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;
32 // Callbacks for triggering notifications:
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
,
41 // Called when the NavigationManager has pruned committed NavigationItems.
42 virtual void OnNavigationItemsPruned(size_t pruned_item_count
) = 0;
47 #endif // IOS_WEB_NAVIGATION_NAVIGATION_MANAGER_FACADE_DELEGATE_H_