OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ |
6 #define CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ | 6 #define CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 virtual void StartRoutingTo(LocalSessionEventHandler* handler) = 0; | 80 virtual void StartRoutingTo(LocalSessionEventHandler* handler) = 0; |
81 virtual void Stop() = 0; | 81 virtual void Stop() = 0; |
82 }; | 82 }; |
83 | 83 |
84 // Contains all logic for associating the Chrome sessions model and | 84 // Contains all logic for associating the Chrome sessions model and |
85 // the sync sessions model. | 85 // the sync sessions model. |
86 class SessionsSyncManager : public syncer::SyncableService, | 86 class SessionsSyncManager : public syncer::SyncableService, |
87 public sync_driver::OpenTabsUIDelegate, | 87 public sync_driver::OpenTabsUIDelegate, |
88 public LocalSessionEventHandler { | 88 public LocalSessionEventHandler { |
89 public: | 89 public: |
90 SessionsSyncManager(Profile* profile, | 90 SessionsSyncManager( |
91 sync_driver::LocalDeviceInfoProvider* local_device, | 91 Profile* profile, |
92 scoped_ptr<LocalSessionEventRouter> router); | 92 sync_driver::LocalDeviceInfoProvider* local_device, |
| 93 scoped_ptr<LocalSessionEventRouter> router, |
| 94 scoped_ptr<SyncedWindowDelegatesGetter> synced_window_getter); |
93 ~SessionsSyncManager() override; | 95 ~SessionsSyncManager() override; |
94 | 96 |
95 // syncer::SyncableService implementation. | 97 // syncer::SyncableService implementation. |
96 syncer::SyncMergeResult MergeDataAndStartSyncing( | 98 syncer::SyncMergeResult MergeDataAndStartSyncing( |
97 syncer::ModelType type, | 99 syncer::ModelType type, |
98 const syncer::SyncDataList& initial_sync_data, | 100 const syncer::SyncDataList& initial_sync_data, |
99 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 101 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
100 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; | 102 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; |
101 void StopSyncing(syncer::ModelType type) override; | 103 void StopSyncing(syncer::ModelType type) override; |
102 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; | 104 syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override; |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 386 |
385 scoped_ptr<LocalSessionEventRouter> local_event_router_; | 387 scoped_ptr<LocalSessionEventRouter> local_event_router_; |
386 scoped_ptr<SyncedWindowDelegatesGetter> synced_window_getter_; | 388 scoped_ptr<SyncedWindowDelegatesGetter> synced_window_getter_; |
387 | 389 |
388 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager); | 390 DISALLOW_COPY_AND_ASSIGN(SessionsSyncManager); |
389 }; | 391 }; |
390 | 392 |
391 } // namespace browser_sync | 393 } // namespace browser_sync |
392 | 394 |
393 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ | 395 #endif // CHROME_BROWSER_SYNC_SESSIONS_SESSIONS_SYNC_MANAGER_H_ |
OLD | NEW |