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