| 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_SYNCED_WINDOW_DELEGATES_GETTER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ |
| 6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ | 6 #define CHROME_BROWSER_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 |
| 9 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/sessions/session_id.h" |
| 10 | 12 |
| 11 namespace browser_sync { | 13 namespace browser_sync { |
| 12 | 14 |
| 13 class SyncedWindowDelegate; | 15 class SyncedWindowDelegate; |
| 14 | 16 |
| 17 // An interface for accessing SyncedWindowDelegates. Subclasses define |
| 18 // how this is done on different platforms. |
| 15 class SyncedWindowDelegatesGetter { | 19 class SyncedWindowDelegatesGetter { |
| 16 public: | 20 public: |
| 17 SyncedWindowDelegatesGetter(); | 21 SyncedWindowDelegatesGetter(); |
| 18 virtual ~SyncedWindowDelegatesGetter(); | 22 virtual ~SyncedWindowDelegatesGetter(); |
| 19 virtual std::set<const SyncedWindowDelegate*> GetSyncedWindowDelegates(); | 23 |
| 24 // Returns all SyncedWindowDelegate instances. |
| 25 virtual std::set<const SyncedWindowDelegate*> GetSyncedWindowDelegates() = 0; |
| 26 |
| 27 // Find a SyncedWindowDelegate given its window's id. |
| 28 virtual const SyncedWindowDelegate* FindById(SessionID::id_type id) = 0; |
| 29 |
| 20 private: | 30 private: |
| 21 DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetter); | 31 DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetter); |
| 22 }; | 32 }; |
| 23 | 33 |
| 24 } // namespace browser_sync | 34 } // namespace browser_sync |
| 25 | 35 |
| 26 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ | 36 #endif // CHROME_BROWSER_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ |
| OLD | NEW |