| 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_SESSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 int index); | 175 int index); |
| 176 | 176 |
| 177 // Sets the index of the selected tab in the specified window. | 177 // Sets the index of the selected tab in the specified window. |
| 178 void SetSelectedTabInWindow(const SessionID& window_id, int index); | 178 void SetSelectedTabInWindow(const SessionID& window_id, int index); |
| 179 | 179 |
| 180 // Sets the user agent override of the specified tab. | 180 // Sets the user agent override of the specified tab. |
| 181 void SetTabUserAgentOverride(const SessionID& window_id, | 181 void SetTabUserAgentOverride(const SessionID& window_id, |
| 182 const SessionID& tab_id, | 182 const SessionID& tab_id, |
| 183 const std::string& user_agent_override); | 183 const std::string& user_agent_override); |
| 184 | 184 |
| 185 void SetTabSessionSyncId(const SessionID& window_id, |
| 186 const SessionID& tab_id, |
| 187 const int64& sync_id); |
| 188 |
| 185 // Callback from GetLastSession. | 189 // Callback from GetLastSession. |
| 186 // The second parameter is the id of the window that was last active. | 190 // The second parameter is the id of the window that was last active. |
| 187 typedef base::Callback<void(ScopedVector<SessionWindow>, SessionID::id_type)> | 191 typedef base::Callback<void(ScopedVector<SessionWindow>, SessionID::id_type)> |
| 188 SessionCallback; | 192 SessionCallback; |
| 189 | 193 |
| 190 // Fetches the contents of the last session, notifying the callback when | 194 // Fetches the contents of the last session, notifying the callback when |
| 191 // done. If the callback is supplied an empty vector of SessionWindows | 195 // done. If the callback is supplied an empty vector of SessionWindows |
| 192 // it means the session could not be restored. | 196 // it means the session could not be restored. |
| 193 CancelableTaskTracker::TaskId GetLastSession(const SessionCallback& callback, | 197 CancelableTaskTracker::TaskId GetLastSession(const SessionCallback& callback, |
| 194 CancelableTaskTracker* tracker); | 198 CancelableTaskTracker* tracker); |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 const base::TimeDelta save_delay_in_hrs_; | 500 const base::TimeDelta save_delay_in_hrs_; |
| 497 | 501 |
| 498 // For browser_tests, since we want to simulate the browser shutting down | 502 // For browser_tests, since we want to simulate the browser shutting down |
| 499 // without quitting. | 503 // without quitting. |
| 500 bool force_browser_not_alive_with_no_windows_; | 504 bool force_browser_not_alive_with_no_windows_; |
| 501 | 505 |
| 502 DISALLOW_COPY_AND_ASSIGN(SessionService); | 506 DISALLOW_COPY_AND_ASSIGN(SessionService); |
| 503 }; | 507 }; |
| 504 | 508 |
| 505 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 509 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| OLD | NEW |