Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: components/sync_sessions/revisit/page_visit_observer.h

Issue 1387253004: [Sync] Creating sync_sessions component, moving revisit logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing test_support target. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_SYNC_DRIVER_REVISIT_PAGE_VISIT_OBSERVERE_H_ 5 #ifndef COMPONENTS_SYNC_SESSIONS_REVISIT_PAGE_VISIT_OBSERVER_H_
6 #define COMPONENTS_SYNC_DRIVER_REVISIT_PAGE_VISIT_OBSERVERE_H_ 6 #define COMPONENTS_SYNC_SESSIONS_REVISIT_PAGE_VISIT_OBSERVER_H_
7 7
8 #include "url/gurl.h" 8 #include <string>
9 9
10 namespace sync_driver { 10 #include "base/time/time.h"
11
12 class GURL;
13
14 namespace sync_sessions {
11 15
12 // An interface that allows observers to be notified when a page is visited. 16 // An interface that allows observers to be notified when a page is visited.
13 class PageVisitObserver { 17 class PageVisitObserver {
14 public: 18 public:
15 // This enum represents the most common ways to visit a new page/URL. 19 // This enum represents the most common ways to visit a new page/URL.
16 enum TransitionType { 20 enum TransitionType {
17 kTransitionPage = 0, 21 kTransitionPage = 0,
18 kTransitionOmniboxUrl = 1, 22 kTransitionOmniboxUrl = 1,
19 kTransitionOmniboxDefaultSearch = 2, 23 kTransitionOmniboxDefaultSearch = 2,
20 kTransitionOmniboxTemplateSearch = 3, 24 kTransitionOmniboxTemplateSearch = 3,
21 kTransitionBookmark = 4, 25 kTransitionBookmark = 4,
22 kTransitionCopyPaste = 5, 26 kTransitionCopyPaste = 5,
23 kTransitionForwardBackward = 6, 27 kTransitionForwardBackward = 6,
24 kTransitionRestore = 7, 28 kTransitionRestore = 7,
25 kTransitionUnknown = 8, 29 kTransitionUnknown = 8,
26 kTransitionTypeLast = 9, 30 kTransitionTypeLast = 9,
27 }; 31 };
28 32
29 virtual ~PageVisitObserver() {} 33 virtual ~PageVisitObserver() {}
30 virtual void OnPageVisit(const GURL& url, 34 virtual void OnPageVisit(const GURL& url,
31 const TransitionType transition) = 0; 35 const TransitionType transition) = 0;
32 }; 36 };
33 37
34 } // namespace sync_driver 38 } // namespace sync_sessions
35 39
36 #endif // COMPONENTS_SYNC_DRIVER_REVISIT_PAGE_VISIT_OBSERVERE_H_ 40 #endif // COMPONENTS_SYNC_SESSIONS_REVISIT_PAGE_VISIT_OBSERVER_H_
OLDNEW
« no previous file with comments | « components/sync_sessions/revisit/page_equality.h ('k') | components/sync_sessions/revisit/sessions_page_revisit_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698