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_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | |
| 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "chrome/browser/sessions/session_id.h" | |
| 12 | |
| 13 class BrowserWindow; | |
| 14 class Profile; | |
| 15 class SessionStorageNamespace; | |
| 16 class TabContents; | |
| 17 class TabNavigation; | |
| 18 class TabRestoreService; | |
| 19 | |
| 20 // Objects implement this interface to provide necessary functionality for | |
| 21 // TabRestoreService to operate. | |
| 22 class TabRestoreServiceDelegate { | |
| 23 public: | |
| 24 virtual void ShowBrowserWindow() = 0; | |
|
Ben Goodger (Google)
2011/03/11 15:21:32
This interface should document its methods or refe
torne_google.com
2011/03/11 15:31:23
Done.
| |
| 25 virtual const SessionID& GetSessionID() const = 0; | |
| 26 virtual int GetTabCount() const = 0; | |
| 27 virtual int GetSelectedIndex() const = 0; | |
| 28 virtual TabContents* GetTabContentsAt(int index) const = 0; | |
| 29 virtual TabContents* GetSelectedTabContents() const = 0; | |
| 30 virtual bool IsTabPinned(int index) const = 0; | |
| 31 virtual TabContents* AddRestoredTab( | |
| 32 const std::vector<TabNavigation>& navigations, | |
| 33 int tab_index, | |
| 34 int selected_navigation, | |
| 35 const std::string& extension_app_id, | |
| 36 bool select, | |
| 37 bool pin, | |
| 38 bool from_last_session, | |
| 39 SessionStorageNamespace* storage_namespace) = 0; | |
| 40 virtual void ReplaceRestoredTab( | |
| 41 const std::vector<TabNavigation>& navigations, | |
| 42 int selected_navigation, | |
| 43 bool from_last_session, | |
| 44 const std::string& extension_app_id, | |
| 45 SessionStorageNamespace* session_storage_namespace) = 0; | |
| 46 virtual void CloseTab() = 0; | |
| 47 | |
| 48 static TabRestoreServiceDelegate* CreateBrowser(Profile* profile); | |
| 49 static TabRestoreServiceDelegate* GetBrowserForController( | |
| 50 const NavigationController* controller, int* index); | |
| 51 static TabRestoreServiceDelegate* FindBrowserWithID( | |
| 52 SessionID::id_type desired_id); | |
| 53 }; | |
| 54 | |
| 55 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | |
| OLD | NEW |