| 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 |
| 11 #include "chrome/browser/sessions/session_id.h" | 11 #include "chrome/browser/sessions/session_id.h" |
| 12 | 12 |
| 13 class NavigationController; | |
| 14 class Profile; | 13 class Profile; |
| 15 class SessionStorageNamespace; | 14 class SessionStorageNamespace; |
| 16 class TabContents; | 15 class TabContents; |
| 17 class TabNavigation; | 16 class TabNavigation; |
| 18 | 17 |
| 19 namespace content { | 18 namespace content { |
| 19 class NavigationController; |
| 20 class WebContents; | 20 class WebContents; |
| 21 } | 21 } |
| 22 | 22 |
| 23 // Objects implement this interface to provide necessary functionality for | 23 // Objects implement this interface to provide necessary functionality for |
| 24 // TabRestoreService to operate. These methods are mostly copies of existing | 24 // TabRestoreService to operate. These methods are mostly copies of existing |
| 25 // Browser methods. | 25 // Browser methods. |
| 26 class TabRestoreServiceDelegate { | 26 class TabRestoreServiceDelegate { |
| 27 public: | 27 public: |
| 28 // see BrowserWindow::Show() | 28 // see BrowserWindow::Show() |
| 29 virtual void ShowBrowserWindow() = 0; | 29 virtual void ShowBrowserWindow() = 0; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 56 bool from_last_session, | 56 bool from_last_session, |
| 57 const std::string& extension_app_id, | 57 const std::string& extension_app_id, |
| 58 SessionStorageNamespace* session_storage_namespace) = 0; | 58 SessionStorageNamespace* session_storage_namespace) = 0; |
| 59 virtual void CloseTab() = 0; | 59 virtual void CloseTab() = 0; |
| 60 | 60 |
| 61 // see Browser::Create | 61 // see Browser::Create |
| 62 static TabRestoreServiceDelegate* Create(Profile* profile); | 62 static TabRestoreServiceDelegate* Create(Profile* profile); |
| 63 | 63 |
| 64 // see BrowserList::GetBrowserForController | 64 // see BrowserList::GetBrowserForController |
| 65 static TabRestoreServiceDelegate* FindDelegateForController( | 65 static TabRestoreServiceDelegate* FindDelegateForController( |
| 66 const NavigationController* controller, | 66 const content::NavigationController* controller, |
| 67 int* index); | 67 int* index); |
| 68 | 68 |
| 69 // see BrowserList::FindBrowserWithID | 69 // see BrowserList::FindBrowserWithID |
| 70 static TabRestoreServiceDelegate* FindDelegateWithID( | 70 static TabRestoreServiceDelegate* FindDelegateWithID( |
| 71 SessionID::id_type desired_id); | 71 SessionID::id_type desired_id); |
| 72 | 72 |
| 73 protected: | 73 protected: |
| 74 virtual ~TabRestoreServiceDelegate() {} | 74 virtual ~TabRestoreServiceDelegate() {} |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | 77 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ |
| OLD | NEW |