OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_GETTER_H_ |
| 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_GETTER_H_ |
| 7 |
| 8 #include <set> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "components/sessions/core/session_id.h" |
| 12 #include "components/sync_sessions/synced_window_delegates_getter.h" |
| 13 |
| 14 namespace browser_sync { |
| 15 class SyncedWindowDelegate; |
| 16 } |
| 17 |
| 18 namespace ios { |
| 19 class ChromeBrowserState; |
| 20 } |
| 21 |
| 22 class TabModelSyncedWindowDelegatesGetter |
| 23 : public sync_sessions::SyncedWindowDelegatesGetter { |
| 24 public: |
| 25 // TODO(crbug.com/548612): |browser_state| may be unnecessary as iOS does not |
| 26 // supports multi-profile starting with M47. Should it be removed? |
| 27 explicit TabModelSyncedWindowDelegatesGetter( |
| 28 ios::ChromeBrowserState* browser_state); |
| 29 ~TabModelSyncedWindowDelegatesGetter() override; |
| 30 |
| 31 // sync_sessions::SyncedWindowDelegatesGetter: |
| 32 std::set<const sync_sessions::SyncedWindowDelegate*> |
| 33 GetSyncedWindowDelegates() override; |
| 34 const sync_sessions::SyncedWindowDelegate* FindById( |
| 35 SessionID::id_type id) override; |
| 36 |
| 37 private: |
| 38 const ios::ChromeBrowserState* const browser_state_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(TabModelSyncedWindowDelegatesGetter); |
| 41 }; |
| 42 |
| 43 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_GETTER_H_ |
OLD | NEW |