| 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 CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATES_GETTER_H_ | 5 #ifndef CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATES_GETTER_H_ |
| 6 #define CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATES_GETTER_H_ | 6 #define CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATES_GETTER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "components/sessions/core/session_id.h" | 11 #include "components/sessions/core/session_id.h" |
| 12 #include "components/sync_sessions/synced_window_delegates_getter.h" | 12 #include "components/sync_sessions/synced_window_delegates_getter.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 | 15 |
| 16 namespace browser_sync { | 16 namespace browser_sync { |
| 17 | 17 |
| 18 // This class defines how to access SyncedWindowDelegates on desktop. | 18 // This class defines how to access SyncedWindowDelegates on desktop. |
| 19 class BrowserSyncedWindowDelegatesGetter | 19 class BrowserSyncedWindowDelegatesGetter |
| 20 : public sync_sessions::SyncedWindowDelegatesGetter { | 20 : public sync_sessions::SyncedWindowDelegatesGetter { |
| 21 public: | 21 public: |
| 22 explicit BrowserSyncedWindowDelegatesGetter(Profile* profile); | 22 explicit BrowserSyncedWindowDelegatesGetter(Profile* profile); |
| 23 ~BrowserSyncedWindowDelegatesGetter() override; | 23 ~BrowserSyncedWindowDelegatesGetter() override; |
| 24 | 24 |
| 25 // SyncedWindowDelegatesGetter implementation | 25 // SyncedWindowDelegatesGetter implementation |
| 26 std::set<const sync_sessions::SyncedWindowDelegate*> | 26 SyncedWindowDelegateMap GetSyncedWindowDelegates() override; |
| 27 GetSyncedWindowDelegates() override; | |
| 28 const sync_sessions::SyncedWindowDelegate* FindById( | 27 const sync_sessions::SyncedWindowDelegate* FindById( |
| 29 SessionID::id_type id) override; | 28 SessionID::id_type id) override; |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 Profile* const profile_; | 31 Profile* const profile_; |
| 33 | 32 |
| 34 DISALLOW_COPY_AND_ASSIGN(BrowserSyncedWindowDelegatesGetter); | 33 DISALLOW_COPY_AND_ASSIGN(BrowserSyncedWindowDelegatesGetter); |
| 35 }; | 34 }; |
| 36 | 35 |
| 37 } // namespace browser_sync | 36 } // namespace browser_sync |
| 38 | 37 |
| 39 #endif // CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATES_GETTER_H_ | 38 #endif // CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATES_GETTER_H_ |
| OLD | NEW |