OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ |
6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 // see Browser::session_id() | 30 // see Browser::session_id() |
31 virtual const SessionID& GetSessionID() const = 0; | 31 virtual const SessionID& GetSessionID() const = 0; |
32 | 32 |
33 // see Browser::tab_count() | 33 // see Browser::tab_count() |
34 virtual int GetTabCount() const = 0; | 34 virtual int GetTabCount() const = 0; |
35 | 35 |
36 // see Browser::active_index() | 36 // see Browser::active_index() |
37 virtual int GetSelectedIndex() const = 0; | 37 virtual int GetSelectedIndex() const = 0; |
38 | 38 |
| 39 // see Browser::app_name() |
| 40 virtual std::string GetAppName() const = 0; |
| 41 |
39 // see Browser methods with the same names | 42 // see Browser methods with the same names |
40 virtual content::WebContents* GetWebContentsAt(int index) const = 0; | 43 virtual content::WebContents* GetWebContentsAt(int index) const = 0; |
41 virtual content::WebContents* GetSelectedWebContents() const = 0; | 44 virtual content::WebContents* GetSelectedWebContents() const = 0; |
42 virtual bool IsTabPinned(int index) const = 0; | 45 virtual bool IsTabPinned(int index) const = 0; |
43 virtual content::WebContents* AddRestoredTab( | 46 virtual content::WebContents* AddRestoredTab( |
44 const std::vector<TabNavigation>& navigations, | 47 const std::vector<TabNavigation>& navigations, |
45 int tab_index, | 48 int tab_index, |
46 int selected_navigation, | 49 int selected_navigation, |
47 const std::string& extension_app_id, | 50 const std::string& extension_app_id, |
48 bool select, | 51 bool select, |
49 bool pin, | 52 bool pin, |
50 bool from_last_session, | 53 bool from_last_session, |
51 content::SessionStorageNamespace* storage_namespace) = 0; | 54 content::SessionStorageNamespace* storage_namespace) = 0; |
52 virtual void ReplaceRestoredTab( | 55 virtual void ReplaceRestoredTab( |
53 const std::vector<TabNavigation>& navigations, | 56 const std::vector<TabNavigation>& navigations, |
54 int selected_navigation, | 57 int selected_navigation, |
55 bool from_last_session, | 58 bool from_last_session, |
56 const std::string& extension_app_id, | 59 const std::string& extension_app_id, |
57 content::SessionStorageNamespace* session_storage_namespace) = 0; | 60 content::SessionStorageNamespace* session_storage_namespace) = 0; |
58 virtual void CloseTab() = 0; | 61 virtual void CloseTab() = 0; |
59 | 62 |
60 // see Browser::Create | 63 // see Browser::Create |
61 static TabRestoreServiceDelegate* Create(Profile* profile); | 64 static TabRestoreServiceDelegate* Create(Profile* profile, |
| 65 const std::string& app_name); |
62 | 66 |
63 // see BrowserList::GetBrowserForController | 67 // see BrowserList::GetBrowserForController |
64 static TabRestoreServiceDelegate* FindDelegateForController( | 68 static TabRestoreServiceDelegate* FindDelegateForController( |
65 const content::NavigationController* controller, | 69 const content::NavigationController* controller, |
66 int* index); | 70 int* index); |
67 | 71 |
68 // see BrowserList::FindBrowserWithID | 72 // see BrowserList::FindBrowserWithID |
69 static TabRestoreServiceDelegate* FindDelegateWithID( | 73 static TabRestoreServiceDelegate* FindDelegateWithID( |
70 SessionID::id_type desired_id); | 74 SessionID::id_type desired_id); |
71 | 75 |
72 protected: | 76 protected: |
73 virtual ~TabRestoreServiceDelegate() {} | 77 virtual ~TabRestoreServiceDelegate() {} |
74 }; | 78 }; |
75 | 79 |
76 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | 80 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ |
OLD | NEW |