Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2011 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_BROWSER_TAB_RESTORE_SERVICE_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_UI_BROWSER_TAB_RESTORE_SERVICE_DELEGATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "chrome/browser/sessions/tab_restore_service_delegate.h" | |
| 12 | |
| 13 class Browser; | |
| 14 class BrowserWindow; | |
| 15 class Profile; | |
| 16 class SessionStorageNamespace; | |
| 17 class TabContents; | |
| 18 class TabNavigation; | |
| 19 class TabRestoreService; | |
| 20 | |
| 21 // Implementation of TabRestoreServiceDelegate which uses an instance of | |
| 22 // Browser in order to fulfil its duties. | |
| 23 class BrowserTabRestoreServiceDelegate : public TabRestoreServiceDelegate { | |
| 24 public: | |
| 25 explicit BrowserTabRestoreServiceDelegate(Browser* browser) | |
| 26 : browser_(browser) { | |
| 27 } | |
| 28 | |
| 29 // Overridden from TabRestoreServiceDelegate: | |
| 30 virtual void ShowBrowserWindow(); | |
|
sky
2011/03/11 17:40:37
Use OVERRIDE on all these.
torne_google.com
2011/03/14 15:07:25
Done.
| |
| 31 virtual const SessionID& GetSessionID() const; | |
| 32 virtual int GetTabCount() const; | |
| 33 virtual int GetSelectedIndex() const; | |
| 34 virtual TabContents* GetTabContentsAt(int index) const; | |
| 35 virtual TabContents* GetSelectedTabContents() const; | |
| 36 virtual bool IsTabPinned(int index) const; | |
| 37 virtual TabContents* AddRestoredTab( | |
| 38 const std::vector<TabNavigation>& navigations, | |
| 39 int tab_index, | |
| 40 int selected_navigation, | |
| 41 const std::string& extension_app_id, | |
| 42 bool select, | |
| 43 bool pin, | |
| 44 bool from_last_session, | |
| 45 SessionStorageNamespace* storage_namespace); | |
| 46 virtual void ReplaceRestoredTab( | |
| 47 const std::vector<TabNavigation>& navigations, | |
| 48 int selected_navigation, | |
| 49 bool from_last_session, | |
| 50 const std::string& extension_app_id, | |
| 51 SessionStorageNamespace* session_storage_namespace); | |
| 52 virtual void CloseTab(); | |
| 53 | |
| 54 private: | |
| 55 Browser* browser_; | |
| 56 | |
| 57 DISALLOW_COPY_AND_ASSIGN(BrowserTabRestoreServiceDelegate); | |
| 58 }; | |
| 59 | |
| 60 #endif // CHROME_BROWSER_UI_BROWSER_TAB_RESTORE_SERVICE_DELEGATE_H_ | |
| OLD | NEW |