Chromium Code Reviews| 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_PERSISTENT_TAB_RESTORE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ | 6 #define CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 | 24 |
| 25 // TabRestoreService: | 25 // TabRestoreService: |
| 26 virtual void AddObserver(TabRestoreServiceObserver* observer) OVERRIDE; | 26 virtual void AddObserver(TabRestoreServiceObserver* observer) OVERRIDE; |
| 27 virtual void RemoveObserver(TabRestoreServiceObserver* observer) OVERRIDE; | 27 virtual void RemoveObserver(TabRestoreServiceObserver* observer) OVERRIDE; |
| 28 virtual void CreateHistoricalTab(content::WebContents* contents, | 28 virtual void CreateHistoricalTab(content::WebContents* contents, |
| 29 int index) OVERRIDE; | 29 int index) OVERRIDE; |
| 30 virtual void BrowserClosing(TabRestoreServiceDelegate* delegate) OVERRIDE; | 30 virtual void BrowserClosing(TabRestoreServiceDelegate* delegate) OVERRIDE; |
| 31 virtual void BrowserClosed(TabRestoreServiceDelegate* delegate) OVERRIDE; | 31 virtual void BrowserClosed(TabRestoreServiceDelegate* delegate) OVERRIDE; |
| 32 virtual void ClearEntries() OVERRIDE; | 32 virtual void ClearEntries() OVERRIDE; |
| 33 virtual const Entries& entries() const OVERRIDE; | 33 virtual const Entries& entries() const OVERRIDE; |
| 34 virtual void RestoreMostRecentEntry( | 34 // Returns the WebContents of the restored tab if entry is a Tab. In the case |
|
sky
2013/08/01 00:05:43
Don't duplicate the documentation when overriding
Kristen Dwan
2013/08/02 20:54:19
Done.
| |
| 35 // of restoring type Window, returns the WebContents of the last successfully | |
| 36 // restored tab in the window. | |
| 37 virtual content::WebContents* RestoreMostRecentEntry( | |
| 35 TabRestoreServiceDelegate* delegate, | 38 TabRestoreServiceDelegate* delegate, |
| 36 chrome::HostDesktopType host_desktop_type) OVERRIDE; | 39 chrome::HostDesktopType host_desktop_type) OVERRIDE; |
| 37 virtual Tab* RemoveTabEntryById(SessionID::id_type id) OVERRIDE; | 40 virtual Tab* RemoveTabEntryById(SessionID::id_type id) OVERRIDE; |
| 38 virtual void RestoreEntryById(TabRestoreServiceDelegate* delegate, | 41 // Returns the WebContents of the restored tab if entry is a Tab. In the case |
| 39 SessionID::id_type id, | 42 // of restoring type Window, returns the WebContents of the last successfully |
| 40 chrome::HostDesktopType host_desktop_type, | 43 // restored tab in the window. |
| 41 WindowOpenDisposition disposition) OVERRIDE; | 44 virtual content::WebContents* RestoreEntryById( |
| 45 TabRestoreServiceDelegate* delegate, | |
| 46 SessionID::id_type id, | |
| 47 chrome::HostDesktopType host_desktop_type, | |
| 48 WindowOpenDisposition disposition) OVERRIDE; | |
| 42 virtual void LoadTabsFromLastSession() OVERRIDE; | 49 virtual void LoadTabsFromLastSession() OVERRIDE; |
| 43 virtual bool IsLoaded() const OVERRIDE; | 50 virtual bool IsLoaded() const OVERRIDE; |
| 44 virtual void DeleteLastSession() OVERRIDE; | 51 virtual void DeleteLastSession() OVERRIDE; |
| 45 virtual void Shutdown() OVERRIDE; | 52 virtual void Shutdown() OVERRIDE; |
| 46 | 53 |
| 47 private: | 54 private: |
| 48 friend class PersistentTabRestoreServiceTest; | 55 friend class PersistentTabRestoreServiceTest; |
| 49 | 56 |
| 50 class Delegate; | 57 class Delegate; |
| 51 | 58 |
| 52 // Exposed for testing. | 59 // Exposed for testing. |
| 53 Entries* mutable_entries(); | 60 Entries* mutable_entries(); |
| 54 void PruneEntries(); | 61 void PruneEntries(); |
| 55 | 62 |
| 56 scoped_ptr<Delegate> delegate_; | 63 scoped_ptr<Delegate> delegate_; |
| 57 TabRestoreServiceHelper helper_; | 64 TabRestoreServiceHelper helper_; |
| 58 | 65 |
| 59 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService); | 66 DISALLOW_COPY_AND_ASSIGN(PersistentTabRestoreService); |
| 60 }; | 67 }; |
| 61 | 68 |
| 62 #endif // CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ | 69 #endif // CHROME_BROWSER_SESSIONS_PERSISTENT_TAB_RESTORE_SERVICE_H_ |
| OLD | NEW |