Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / sync / browser_synced_window_delegate.h
blob2ca19815de9e746856d2ec3b01de3824047f872a
1 // Copyright (c) 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.
5 #ifndef CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_
6 #define CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_
8 #include "base/compiler_specific.h"
9 #include "components/sessions/session_id.h"
10 #include "components/sync_driver/glue/synced_window_delegate.h"
12 class Browser;
14 namespace browser_sync {
15 class SyncedTabDelegate;
18 // A BrowserSyncedWindowDelegate is the Browser-based implementation of
19 // SyncedWindowDelegate.
20 class BrowserSyncedWindowDelegate : public browser_sync::SyncedWindowDelegate {
21 public:
22 explicit BrowserSyncedWindowDelegate(Browser* browser);
23 ~BrowserSyncedWindowDelegate() override;
25 // SyncedWindowDelegate:
26 bool HasWindow() const override;
27 SessionID::id_type GetSessionId() const override;
28 int GetTabCount() const override;
29 int GetActiveIndex() const override;
30 bool IsApp() const override;
31 bool IsTypeTabbed() const override;
32 bool IsTypePopup() const override;
33 bool IsTabPinned(const browser_sync::SyncedTabDelegate* tab) const override;
34 browser_sync::SyncedTabDelegate* GetTabAt(int index) const override;
35 SessionID::id_type GetTabIdAt(int index) const override;
36 bool IsSessionRestoreInProgress() const override;
37 bool ShouldSync() const override;
39 private:
40 Browser* browser_;
42 DISALLOW_COPY_AND_ASSIGN(BrowserSyncedWindowDelegate);
45 #endif // CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_