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. 4 5#ifndef CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_ 6#define CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_ 7 8#include "base/compiler_specific.h" 9#include "chrome/browser/sync/glue/synced_window_delegate.h" 10#include "components/sessions/session_id.h" 11 12class Browser; 13 14namespace browser_sync { 15class SyncedTabDelegate; 16} 17 18// A BrowserSyncedWindowDelegate is the Browser-based implementation of 19// SyncedWindowDelegate. 20class BrowserSyncedWindowDelegate : public browser_sync::SyncedWindowDelegate { 21 public: 22 explicit BrowserSyncedWindowDelegate(Browser* browser); 23 virtual ~BrowserSyncedWindowDelegate(); 24 25 // SyncedWindowDelegate: 26 virtual bool HasWindow() const OVERRIDE; 27 virtual SessionID::id_type GetSessionId() const OVERRIDE; 28 virtual int GetTabCount() const OVERRIDE; 29 virtual int GetActiveIndex() const OVERRIDE; 30 virtual bool IsApp() const OVERRIDE; 31 virtual bool IsTypeTabbed() const OVERRIDE; 32 virtual bool IsTypePopup() const OVERRIDE; 33 virtual bool IsTabPinned( 34 const browser_sync::SyncedTabDelegate* tab) const OVERRIDE; 35 virtual browser_sync::SyncedTabDelegate* GetTabAt(int index) const OVERRIDE; 36 virtual SessionID::id_type GetTabIdAt(int index) const OVERRIDE; 37 virtual bool IsSessionRestoreInProgress() const OVERRIDE; 38 39 private: 40 Browser* browser_; 41 42 DISALLOW_COPY_AND_ASSIGN(BrowserSyncedWindowDelegate); 43}; 44 45#endif // CHROME_BROWSER_UI_SYNC_BROWSER_SYNCED_WINDOW_DELEGATE_H_ 46