OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 |
11 #include "chrome/browser/sessions/session_id.h" | 11 #include "chrome/browser/sessions/session_id.h" |
| 12 #include "content/public/browser/navigation_controller.h" |
12 | 13 |
13 class Profile; | 14 class Profile; |
14 class TabNavigation; | 15 class TabNavigation; |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 class NavigationController; | 18 class NavigationController; |
18 class SessionStorageNamespace; | 19 class SessionStorageNamespace; |
19 class WebContents; | 20 class WebContents; |
20 } | 21 } |
21 | 22 |
(...skipping 22 matching lines...) Expand all Loading... |
44 virtual content::WebContents* GetActiveWebContents() const = 0; | 45 virtual content::WebContents* GetActiveWebContents() const = 0; |
45 virtual bool IsTabPinned(int index) const = 0; | 46 virtual bool IsTabPinned(int index) const = 0; |
46 virtual content::WebContents* AddRestoredTab( | 47 virtual content::WebContents* AddRestoredTab( |
47 const std::vector<TabNavigation>& navigations, | 48 const std::vector<TabNavigation>& navigations, |
48 int tab_index, | 49 int tab_index, |
49 int selected_navigation, | 50 int selected_navigation, |
50 const std::string& extension_app_id, | 51 const std::string& extension_app_id, |
51 bool select, | 52 bool select, |
52 bool pin, | 53 bool pin, |
53 bool from_last_session, | 54 bool from_last_session, |
54 content::SessionStorageNamespace* storage_namespace) = 0; | 55 const content::SessionStorageNamespaceMap& storage_namespace_map) = 0; |
55 virtual void ReplaceRestoredTab( | 56 virtual void ReplaceRestoredTab( |
56 const std::vector<TabNavigation>& navigations, | 57 const std::vector<TabNavigation>& navigations, |
57 int selected_navigation, | 58 int selected_navigation, |
58 bool from_last_session, | 59 bool from_last_session, |
59 const std::string& extension_app_id, | 60 const std::string& extension_app_id, |
60 content::SessionStorageNamespace* session_storage_namespace) = 0; | 61 const content::SessionStorageNamespaceMap& storage_namespace_map) = 0; |
61 virtual void CloseTab() = 0; | 62 virtual void CloseTab() = 0; |
62 | 63 |
63 // see Browser::Create | 64 // see Browser::Create |
64 static TabRestoreServiceDelegate* Create(Profile* profile, | 65 static TabRestoreServiceDelegate* Create(Profile* profile, |
65 const std::string& app_name); | 66 const std::string& app_name); |
66 | 67 |
67 // see browser::FindBrowserForWebContents | 68 // see browser::FindBrowserForWebContents |
68 static TabRestoreServiceDelegate* FindDelegateForWebContents( | 69 static TabRestoreServiceDelegate* FindDelegateForWebContents( |
69 const content::WebContents* contents); | 70 const content::WebContents* contents); |
70 | 71 |
71 // see browser::FindBrowserWithID | 72 // see browser::FindBrowserWithID |
72 static TabRestoreServiceDelegate* FindDelegateWithID( | 73 static TabRestoreServiceDelegate* FindDelegateWithID( |
73 SessionID::id_type desired_id); | 74 SessionID::id_type desired_id); |
74 | 75 |
75 protected: | 76 protected: |
76 virtual ~TabRestoreServiceDelegate() {} | 77 virtual ~TabRestoreServiceDelegate() {} |
77 }; | 78 }; |
78 | 79 |
79 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | 80 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ |
OLD | NEW |