OLD | NEW |
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_SESSIONS_PAGE_REVISIT_OBSERVER_H_ | 5 #ifndef COMPONENTS_SYNC_SESSIONS_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ |
6 #define COMPONENTS_SYNC_DRIVER_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ | 6 #define COMPONENTS_SYNC_SESSIONS_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "components/sync_driver/revisit/page_visit_observer.h" | 12 #include "components/sync_sessions/revisit/page_visit_observer.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 namespace sessions { | 15 namespace sessions { |
16 struct SessionTab; | 16 struct SessionTab; |
17 } // namespace sessions | 17 } // namespace sessions |
18 | 18 |
19 namespace sync_driver { | 19 namespace sync_driver { |
| 20 struct SyncedSession; |
| 21 } // namespace sync_driver |
20 | 22 |
21 struct SyncedSession; | 23 namespace sync_sessions { |
22 | 24 |
23 class CurrentTabMatcher; | 25 class CurrentTabMatcher; |
24 class OffsetTabMatcher; | 26 class OffsetTabMatcher; |
25 | 27 |
26 // A simple interface to abstract away who is providing sessions. | 28 // A simple interface to abstract away who is providing sessions. |
27 class ForeignSessionsProvider { | 29 class ForeignSessionsProvider { |
28 public: | 30 public: |
29 // Fills the already instantiated passed vector with all foreign sessions. | 31 // Fills the already instantiated passed vector with all foreign sessions. |
30 // Returned boolean representes if there were foreign sessions and the vector | 32 // Returned boolean representes if there were foreign sessions and the vector |
31 // should be examimed. | 33 // should be examimed. |
(...skipping 21 matching lines...) Expand all Loading... |
53 // Although the signature is identical to OnPageVisit(...), this method | 55 // Although the signature is identical to OnPageVisit(...), this method |
54 // actually does all of the work. The assumption is that this method is the | 56 // actually does all of the work. The assumption is that this method is the |
55 // target of a PostTask call coming from OnPageVisit(...). | 57 // target of a PostTask call coming from OnPageVisit(...). |
56 void CheckForRevisit(const GURL& url, const TransitionType transition); | 58 void CheckForRevisit(const GURL& url, const TransitionType transition); |
57 | 59 |
58 scoped_ptr<ForeignSessionsProvider> provider_; | 60 scoped_ptr<ForeignSessionsProvider> provider_; |
59 | 61 |
60 DISALLOW_COPY_AND_ASSIGN(SessionsPageRevisitObserver); | 62 DISALLOW_COPY_AND_ASSIGN(SessionsPageRevisitObserver); |
61 }; | 63 }; |
62 | 64 |
63 } // namespace sync_driver | 65 } // namespace sync_sessions |
64 | 66 |
65 #endif // COMPONENTS_SYNC_DRIVER_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ | 67 #endif // COMPONENTS_SYNC_SESSIONS_REVISIT_SESSIONS_PAGE_REVISIT_OBSERVER_H_ |
OLD | NEW |