Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2025)

Side by Side Diff: components/sync_sessions/synced_window_delegates_getter.h

Issue 2712743006: Reland v5 of Sessions Refactor (Closed)
Patch Set: Fix typo Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 COMPONENTS_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ 5 #ifndef COMPONENTS_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_
6 #define COMPONENTS_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ 6 #define COMPONENTS_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_
7 7
8 #include <set> 8 #include <map>
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 12
13 namespace sync_sessions { 13 namespace sync_sessions {
14 14
15 class SyncedWindowDelegate; 15 class SyncedWindowDelegate;
16 16
17 // An interface for accessing SyncedWindowDelegates. Subclasses define 17 // An interface for accessing SyncedWindowDelegates. Subclasses define
18 // how this is done on different platforms. 18 // how this is done on different platforms.
19 class SyncedWindowDelegatesGetter { 19 class SyncedWindowDelegatesGetter {
20 public: 20 public:
21 using SyncedWindowDelegateMap =
22 std::map<SessionID::id_type, const SyncedWindowDelegate*>;
23
21 SyncedWindowDelegatesGetter(); 24 SyncedWindowDelegatesGetter();
22 virtual ~SyncedWindowDelegatesGetter(); 25 virtual ~SyncedWindowDelegatesGetter();
23 26
24 // Returns all SyncedWindowDelegate instances. 27 // Returns all SyncedWindowDelegate instances.
25 virtual std::set<const SyncedWindowDelegate*> GetSyncedWindowDelegates() = 0; 28 virtual SyncedWindowDelegateMap GetSyncedWindowDelegates() = 0;
26 29
27 // Find a SyncedWindowDelegate given its window's id. 30 // Find a SyncedWindowDelegate given its window's id.
28 virtual const SyncedWindowDelegate* FindById(SessionID::id_type id) = 0; 31 virtual const SyncedWindowDelegate* FindById(SessionID::id_type id) = 0;
29 32
30 private: 33 private:
31 DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetter); 34 DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegatesGetter);
32 }; 35 };
33 36
34 } // namespace sync_sessions 37 } // namespace sync_sessions
35 38
36 #endif // COMPONENTS_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_ 39 #endif // COMPONENTS_SYNC_SESSIONS_SYNCED_WINDOW_DELEGATES_GETTER_H_
OLDNEW
« no previous file with comments | « components/sync_sessions/synced_session_tracker_unittest.cc ('k') | components/sync_sessions/tab_node_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698