1 // Copyright 2015 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 COMPONENTS_SYNC_DRIVER_REVISIT_PAGE_VISIT_OBSERVERE_H_
6 #define COMPONENTS_SYNC_DRIVER_REVISIT_PAGE_VISIT_OBSERVERE_H_
10 namespace sync_driver
{
12 // An interface that allows observers to be notified when a page is visited.
13 class PageVisitObserver
{
15 // This enum represents the most common ways to visit a new page/URL.
18 kTransitionOmniboxUrl
= 1,
19 kTransitionOmniboxDefaultSearch
= 2,
20 kTransitionOmniboxTemplateSearch
= 3,
21 kTransitionBookmark
= 4,
22 kTransitionCopyPaste
= 5,
23 kTransitionForwardBackward
= 6,
24 kTransitionRestore
= 7,
25 kTransitionUnknown
= 8,
26 kTransitionTypeLast
= 9,
29 virtual ~PageVisitObserver() {}
30 virtual void OnPageVisit(const GURL
& url
,
31 const TransitionType transition
) = 0;
34 } // namespace sync_driver
36 #endif // COMPONENTS_SYNC_DRIVER_REVISIT_PAGE_VISIT_OBSERVERE_H_