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_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 // Index of the selected tab. | 111 // Index of the selected tab. |
112 int selected_tab_index; | 112 int selected_tab_index; |
113 }; | 113 }; |
114 | 114 |
115 typedef std::list<Entry*> Entries; | 115 typedef std::list<Entry*> Entries; |
116 | 116 |
117 // Creates a new TabRestoreService and provides an object that provides the | 117 // Creates a new TabRestoreService and provides an object that provides the |
118 // current time. The TabRestoreService does not take ownership of the | 118 // current time. The TabRestoreService does not take ownership of the |
119 // |time_factory_|. | 119 // |time_factory_|. |
120 explicit TabRestoreService(Profile* profile, | 120 TabRestoreService(Profile* profile, TimeFactory* time_factory_ = NULL); |
121 TimeFactory* time_factory_ = NULL); | |
122 | 121 |
123 virtual ~TabRestoreService(); | 122 virtual ~TabRestoreService(); |
124 | 123 |
125 // Adds/removes an observer. TabRestoreService does not take ownership of | 124 // Adds/removes an observer. TabRestoreService does not take ownership of |
126 // the observer. | 125 // the observer. |
127 void AddObserver(TabRestoreServiceObserver* observer); | 126 void AddObserver(TabRestoreServiceObserver* observer); |
128 void RemoveObserver(TabRestoreServiceObserver* observer); | 127 void RemoveObserver(TabRestoreServiceObserver* observer); |
129 | 128 |
130 // Creates a Tab to represent |tab| and notifies observers the list of | 129 // Creates a Tab to represent |tab| and notifies observers the list of |
131 // entries has changed. | 130 // entries has changed. |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 // loading LoadStateChanged is invoked, which adds these entries to | 337 // loading LoadStateChanged is invoked, which adds these entries to |
339 // entries_. | 338 // entries_. |
340 std::vector<Entry*> staging_entries_; | 339 std::vector<Entry*> staging_entries_; |
341 | 340 |
342 TimeFactory* time_factory_; | 341 TimeFactory* time_factory_; |
343 | 342 |
344 DISALLOW_COPY_AND_ASSIGN(TabRestoreService); | 343 DISALLOW_COPY_AND_ASSIGN(TabRestoreService); |
345 }; | 344 }; |
346 | 345 |
347 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ | 346 #endif // CHROME_BROWSER_SESSIONS_TAB_RESTORE_SERVICE_H_ |
OLD | NEW |