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

Side by Side Diff: ios/chrome/browser/tabs/tab_model_synced_window_delegate.h

Issue 2845353002: [ios] ARCMigrate i/c/b/tabs/tab_model_synced_window_delegate*. (Closed)
Patch Set: Rebase Created 3 years, 7 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_ 5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_
6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_ 6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/sessions/core/session_id.h" 9 #include "components/sessions/core/session_id.h"
10 #include "components/sync_sessions/synced_window_delegate.h" 10 #include "components/sync_sessions/synced_window_delegate.h"
11 11
12 @class TabModel; 12 class WebStateList;
13 13
14 namespace browser_sync { 14 namespace browser_sync {
15 class SyncedTabDelegate; 15 class SyncedTabDelegate;
16 } 16 }
17 17
18 // A TabModelSyncedWindowDelegate is the iOS-based implementation of 18 // A TabModelSyncedWindowDelegate is the iOS-based implementation of
19 // SyncedWindowDelegate. 19 // SyncedWindowDelegate.
20 class TabModelSyncedWindowDelegate 20 class TabModelSyncedWindowDelegate
21 : public sync_sessions::SyncedWindowDelegate { 21 : public sync_sessions::SyncedWindowDelegate {
22 public: 22 public:
23 explicit TabModelSyncedWindowDelegate(TabModel* tab_model); 23 TabModelSyncedWindowDelegate(WebStateList* web_state_list,
24 SessionID session_id);
24 ~TabModelSyncedWindowDelegate() override; 25 ~TabModelSyncedWindowDelegate() override;
25 26
26 // SyncedWindowDelegate: 27 // SyncedWindowDelegate:
27 bool HasWindow() const override; 28 bool HasWindow() const override;
28 SessionID::id_type GetSessionId() const override; 29 SessionID::id_type GetSessionId() const override;
29 int GetTabCount() const override; 30 int GetTabCount() const override;
30 int GetActiveIndex() const override; 31 int GetActiveIndex() const override;
31 bool IsApp() const override; 32 bool IsApp() const override;
32 bool IsTypeTabbed() const override; 33 bool IsTypeTabbed() const override;
33 bool IsTypePopup() const override; 34 bool IsTypePopup() const override;
34 bool IsTabPinned(const sync_sessions::SyncedTabDelegate* tab) const override; 35 bool IsTabPinned(const sync_sessions::SyncedTabDelegate* tab) const override;
35 sync_sessions::SyncedTabDelegate* GetTabAt(int index) const override; 36 sync_sessions::SyncedTabDelegate* GetTabAt(int index) const override;
36 // Return the tab id for the tab at |index|. 37 // Return the tab id for the tab at |index|.
37 SessionID::id_type GetTabIdAt(int index) const override; 38 SessionID::id_type GetTabIdAt(int index) const override;
38 bool IsSessionRestoreInProgress() const override; 39 bool IsSessionRestoreInProgress() const override;
39 bool ShouldSync() const override; 40 bool ShouldSync() const override;
40 41
41 private: 42 private:
42 TabModel* tab_model_; // weak, owns us. 43 WebStateList* web_state_list_;
44 SessionID session_id_;
43 45
44 DISALLOW_COPY_AND_ASSIGN(TabModelSyncedWindowDelegate); 46 DISALLOW_COPY_AND_ASSIGN(TabModelSyncedWindowDelegate);
45 }; 47 };
46 48
47 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_ 49 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/tabs/tab_model.mm ('k') | ios/chrome/browser/tabs/tab_model_synced_window_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698