| 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // illusion that app windows run in separate processes. Similar behavior occurs | 48 // illusion that app windows run in separate processes. Similar behavior occurs |
| 49 // with incognito windows. | 49 // with incognito windows. |
| 50 // | 50 // |
| 51 // SessionService itself maintains a set of SessionCommands that allow | 51 // SessionService itself maintains a set of SessionCommands that allow |
| 52 // SessionService to rebuild the open state of the browser (as SessionWindow, | 52 // SessionService to rebuild the open state of the browser (as SessionWindow, |
| 53 // SessionTab and SerializedNavigationEntry). The commands are periodically | 53 // SessionTab and SerializedNavigationEntry). The commands are periodically |
| 54 // flushed to SessionBackend and written to a file. Every so often | 54 // flushed to SessionBackend and written to a file. Every so often |
| 55 // SessionService rebuilds the contents of the file from the open state of the | 55 // SessionService rebuilds the contents of the file from the open state of the |
| 56 // browser. | 56 // browser. |
| 57 class SessionService : public BaseSessionService, | 57 class SessionService : public BaseSessionService, |
| 58 public ProfileKeyedService, | 58 public BrowserContextKeyedService, |
| 59 public content::NotificationObserver, | 59 public content::NotificationObserver, |
| 60 public chrome::BrowserListObserver { | 60 public chrome::BrowserListObserver { |
| 61 friend class SessionServiceTestHelper; | 61 friend class SessionServiceTestHelper; |
| 62 public: | 62 public: |
| 63 // Used to distinguish an application window from a normal one. | 63 // Used to distinguish an application window from a normal one. |
| 64 enum AppType { | 64 enum AppType { |
| 65 TYPE_APP, | 65 TYPE_APP, |
| 66 TYPE_NORMAL | 66 TYPE_NORMAL |
| 67 }; | 67 }; |
| 68 | 68 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 const base::TimeDelta save_delay_in_hrs_; | 496 const base::TimeDelta save_delay_in_hrs_; |
| 497 | 497 |
| 498 // For browser_tests, since we want to simulate the browser shutting down | 498 // For browser_tests, since we want to simulate the browser shutting down |
| 499 // without quitting. | 499 // without quitting. |
| 500 bool force_browser_not_alive_with_no_windows_; | 500 bool force_browser_not_alive_with_no_windows_; |
| 501 | 501 |
| 502 DISALLOW_COPY_AND_ASSIGN(SessionService); | 502 DISALLOW_COPY_AND_ASSIGN(SessionService); |
| 503 }; | 503 }; |
| 504 | 504 |
| 505 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ | 505 #endif // CHROME_BROWSER_SESSIONS_SESSION_SERVICE_H_ |
| OLD | NEW |