Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_SESSIONS_CORE_OPEN_TAB_H_ | |
| 6 #define COMPONENTS_SESSIONS_CORE_OPEN_TAB_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "components/sessions/serialized_navigation_entry.h" | |
| 10 #include "components/sessions/sessions_export.h" | |
| 11 | |
| 12 namespace sessions { | |
| 13 | |
| 14 // Interface that represents an open tab to the core sessions code, and in | |
| 15 // particular, the tab restore service. This interface abstracts the concrete | |
| 16 // representation of an open tab on different platforms (e.g., WebContents on | |
| 17 // //content-based platforms). | |
| 18 class SESSIONS_EXPORT OpenTab { | |
|
sky
2015/09/16 20:04:53
I'm not too thrilled about this name. It reads as
blundell
2015/09/17 11:52:25
Done.
| |
| 19 public: | |
| 20 virtual ~OpenTab() {} | |
| 21 | |
| 22 // Methods that return information about the navigation state of the tab. | |
| 23 virtual int GetCurrentEntryIndex() = 0; | |
| 24 virtual int GetPendingEntryIndex() = 0; | |
| 25 virtual sessions::SerializedNavigationEntry GetEntryAtIndex(int index) = 0; | |
| 26 virtual sessions::SerializedNavigationEntry GetPendingEntry() = 0; | |
| 27 virtual int GetEntryCount() = 0; | |
| 28 | |
| 29 // Loads the current page if necessary (where "necessary" is defined on a | |
| 30 // platform-specific basis). | |
| 31 virtual void LoadIfNecessary() = 0; | |
| 32 | |
| 33 // Returs the user agent override, if any. | |
|
sky
2015/09/16 20:04:53
Returns
blundell
2015/09/17 11:52:25
Done.
| |
| 34 virtual const std::string& GetUserAgentOverride() const = 0; | |
| 35 }; | |
| 36 | |
| 37 } // namespace sessions | |
| 38 | |
| 39 #endif // COMPONENTS_SESSIONS_CORE_OPEN_TAB_H_ | |
| OLD | NEW |