Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: components/sessions/core/live_tab.h

Issue 1309323004: Create a NavigationEntry for the initial blank page. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix GetEntryCount, more tests Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_ 5 #ifndef COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_
6 #define COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_ 6 #define COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "components/sessions/core/serialized_navigation_entry.h" 9 #include "components/sessions/core/serialized_navigation_entry.h"
10 #include "components/sessions/core/sessions_export.h" 10 #include "components/sessions/core/sessions_export.h"
11 #include "components/sessions/core/tab_restore_service.h" 11 #include "components/sessions/core/tab_restore_service.h"
12 12
13 namespace sessions { 13 namespace sessions {
14 14
15 // Interface that represents a currently-live tab to the core sessions code, and 15 // Interface that represents a currently-live tab to the core sessions code, and
16 // in particular, the tab restore service. This interface abstracts the concrete 16 // in particular, the tab restore service. This interface abstracts the concrete
17 // representation of a live tab on different platforms (e.g., WebContents on 17 // representation of a live tab on different platforms (e.g., WebContents on
18 // //content-based platforms). 18 // //content-based platforms).
19 class SESSIONS_EXPORT LiveTab { 19 class SESSIONS_EXPORT LiveTab {
20 public: 20 public:
21 virtual ~LiveTab(); 21 virtual ~LiveTab();
22 22
23 // Methods that return information about the navigation state of the tab. 23 // Methods that return information about the navigation state of the tab.
24 virtual bool IsInitialNavigation() = 0; 24 virtual bool IsInitialBlankNavigation() = 0;
25 virtual int GetCurrentEntryIndex() = 0; 25 virtual int GetCurrentEntryIndex() = 0;
26 virtual int GetPendingEntryIndex() = 0; 26 virtual int GetPendingEntryIndex() = 0;
27 virtual SerializedNavigationEntry GetEntryAtIndex(int index) = 0; 27 virtual SerializedNavigationEntry GetEntryAtIndex(int index) = 0;
28 virtual SerializedNavigationEntry GetPendingEntry() = 0; 28 virtual SerializedNavigationEntry GetPendingEntry() = 0;
29 virtual int GetEntryCount() = 0; 29 virtual int GetEntryCount() = 0;
30 30
31 // Returns any platform-specific data that should be associated with the 31 // Returns any platform-specific data that should be associated with the
32 // TabRestoreService::Tab corresponding to this instance. The default 32 // TabRestoreService::Tab corresponding to this instance. The default
33 // implementation returns null. 33 // implementation returns null.
34 virtual scoped_ptr<PlatformSpecificTabData> GetPlatformSpecificTabData(); 34 virtual scoped_ptr<PlatformSpecificTabData> GetPlatformSpecificTabData();
35 35
36 // Loads the current page if necessary (where "necessary" is defined on a 36 // Loads the current page if necessary (where "necessary" is defined on a
37 // platform-specific basis). 37 // platform-specific basis).
38 virtual void LoadIfNecessary() = 0; 38 virtual void LoadIfNecessary() = 0;
39 39
40 // Returns the user agent override, if any. 40 // Returns the user agent override, if any.
41 virtual const std::string& GetUserAgentOverride() const = 0; 41 virtual const std::string& GetUserAgentOverride() const = 0;
42 }; 42 };
43 43
44 } // namespace sessions 44 } // namespace sessions
45 45
46 #endif // COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_ 46 #endif // COMPONENTS_SESSIONS_CORE_LIVE_TAB_H_
OLDNEW
« no previous file with comments | « components/sessions/content/content_live_tab.cc ('k') | components/sessions/core/tab_restore_service_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698