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

Side by Side Diff: components/sessions/ios/ios_live_tab.h

Issue 2727663004: Use TabLoader in TabRestoreService. (Closed)
Patch Set: Created 3 years, 9 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_IOS_IOS_LIVE_TAB_H_ 5 #ifndef COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_
6 #define COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_ 6 #define COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/supports_user_data.h" 9 #include "base/supports_user_data.h"
10 #include "components/sessions/core/live_tab.h" 10 #include "components/sessions/core/live_tab.h"
(...skipping 17 matching lines...) Expand all
28 // it has not already been created. 28 // it has not already been created.
29 static IOSLiveTab* GetForWebState(web::WebState* web_state); 29 static IOSLiveTab* GetForWebState(web::WebState* web_state);
30 30
31 // LiveTab: 31 // LiveTab:
32 bool IsInitialBlankNavigation() override; 32 bool IsInitialBlankNavigation() override;
33 int GetCurrentEntryIndex() override; 33 int GetCurrentEntryIndex() override;
34 int GetPendingEntryIndex() override; 34 int GetPendingEntryIndex() override;
35 sessions::SerializedNavigationEntry GetEntryAtIndex(int index) override; 35 sessions::SerializedNavigationEntry GetEntryAtIndex(int index) override;
36 sessions::SerializedNavigationEntry GetPendingEntry() override; 36 sessions::SerializedNavigationEntry GetPendingEntry() override;
37 int GetEntryCount() override; 37 int GetEntryCount() override;
38 void LoadIfNecessary() override;
39 const std::string& GetUserAgentOverride() const override; 38 const std::string& GetUserAgentOverride() const override;
40 39
41 web::WebState* web_state() { return web_state_; } 40 web::WebState* web_state() { return web_state_; }
42 const web::WebState* web_state() const { return web_state_; } 41 const web::WebState* web_state() const { return web_state_; }
43 42
44 private: 43 private:
45 friend class base::SupportsUserData; 44 friend class base::SupportsUserData;
46 45
47 explicit IOSLiveTab(web::WebState* web_state); 46 explicit IOSLiveTab(web::WebState* web_state);
48 47
49 web::NavigationManager* navigation_manager() { 48 web::NavigationManager* navigation_manager() {
50 return web_state_->GetNavigationManager(); 49 return web_state_->GetNavigationManager();
51 } 50 }
52 51
53 web::WebState* web_state_; 52 web::WebState* web_state_;
54 53
55 // Needed to return an empty string in GetUserAgentOverride(). 54 // Needed to return an empty string in GetUserAgentOverride().
56 static std::string user_agent_override_; 55 static std::string user_agent_override_;
57 56
58 DISALLOW_COPY_AND_ASSIGN(IOSLiveTab); 57 DISALLOW_COPY_AND_ASSIGN(IOSLiveTab);
59 }; 58 };
60 59
61 } // namespace sessions 60 } // namespace sessions
62 61
63 #endif // COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_ 62 #endif // COMPONENTS_SESSIONS_IOS_IOS_LIVE_TAB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698