| 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/profiles/profile.h" | |
| 12 #include "chrome/browser/ui/host_desktop.h" | |
| 13 #include "components/sessions/session_id.h" | 11 #include "components/sessions/session_id.h" |
| 14 | 12 |
| 15 class Profile; | |
| 16 | |
| 17 namespace content { | 13 namespace content { |
| 18 class NavigationController; | 14 class NavigationController; |
| 19 class SessionStorageNamespace; | 15 class SessionStorageNamespace; |
| 20 class WebContents; | 16 class WebContents; |
| 21 } | 17 } |
| 22 | 18 |
| 23 namespace sessions { | 19 namespace sessions { |
| 24 class SerializedNavigationEntry; | 20 class SerializedNavigationEntry; |
| 25 } | 21 } |
| 26 | 22 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 const std::string& user_agent_override) = 0; | 56 const std::string& user_agent_override) = 0; |
| 61 virtual content::WebContents* ReplaceRestoredTab( | 57 virtual content::WebContents* ReplaceRestoredTab( |
| 62 const std::vector<sessions::SerializedNavigationEntry>& navigations, | 58 const std::vector<sessions::SerializedNavigationEntry>& navigations, |
| 63 int selected_navigation, | 59 int selected_navigation, |
| 64 bool from_last_session, | 60 bool from_last_session, |
| 65 const std::string& extension_app_id, | 61 const std::string& extension_app_id, |
| 66 content::SessionStorageNamespace* session_storage_namespace, | 62 content::SessionStorageNamespace* session_storage_namespace, |
| 67 const std::string& user_agent_override) = 0; | 63 const std::string& user_agent_override) = 0; |
| 68 virtual void CloseTab() = 0; | 64 virtual void CloseTab() = 0; |
| 69 | 65 |
| 70 // see Browser::Create | |
| 71 static TabRestoreServiceDelegate* Create( | |
| 72 Profile* profile, | |
| 73 chrome::HostDesktopType host_desktop_type, | |
| 74 const std::string& app_name); | |
| 75 | |
| 76 // see browser::FindBrowserForWebContents | |
| 77 static TabRestoreServiceDelegate* FindDelegateForWebContents( | |
| 78 const content::WebContents* contents); | |
| 79 | |
| 80 // see chrome::FindBrowserWithID | |
| 81 // Returns the TabRestoreServiceDelegate of the Browser with |desired_id| if | |
| 82 // such a Browser exists and is on the desktop defined by |host_desktop_type|. | |
| 83 static TabRestoreServiceDelegate* FindDelegateWithID( | |
| 84 SessionID::id_type desired_id, | |
| 85 chrome::HostDesktopType host_desktop_type); | |
| 86 | |
| 87 protected: | 66 protected: |
| 88 virtual ~TabRestoreServiceDelegate() {} | 67 virtual ~TabRestoreServiceDelegate() {} |
| 89 }; | 68 }; |
| 90 | 69 |
| 91 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ | 70 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_DELEGATE_H_ |
| OLD | NEW |