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

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

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_
6 #define IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_
7
8 #include "base/macros.h"
9 #include "components/sessions/core/session_id.h"
10 #include "components/sync_sessions/synced_window_delegate.h"
11
12 @class TabModel;
13
14 namespace browser_sync {
15 class SyncedTabDelegate;
16 }
17
18 // A TabModelSyncedWindowDelegate is the iOS-based implementation of
19 // SyncedWindowDelegate.
20 class TabModelSyncedWindowDelegate
21 : public sync_sessions::SyncedWindowDelegate {
22 public:
23 explicit TabModelSyncedWindowDelegate(TabModel* tab_model);
24 ~TabModelSyncedWindowDelegate() override;
25
26 // SyncedWindowDelegate:
27 bool HasWindow() const override;
28 SessionID::id_type GetSessionId() const override;
29 int GetTabCount() const override;
30 int GetActiveIndex() const override;
31 bool IsApp() const override;
32 bool IsTypeTabbed() const override;
33 bool IsTypePopup() const override;
34 bool IsTabPinned(const sync_sessions::SyncedTabDelegate* tab) const override;
35 sync_sessions::SyncedTabDelegate* GetTabAt(int index) const override;
36 // Return the tab id for the tab at |index|.
37 SessionID::id_type GetTabIdAt(int index) const override;
38 bool IsSessionRestoreInProgress() const override;
39 bool ShouldSync() const override;
40
41 private:
42 TabModel* tab_model_; // weak, owns us.
43
44 DISALLOW_COPY_AND_ASSIGN(TabModelSyncedWindowDelegate);
45 };
46
47 #endif // IOS_CHROME_BROWSER_TABS_TAB_MODEL_SYNCED_WINDOW_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698