| OLD | NEW |
| 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 #include "components/sessions/ios/ios_live_tab.h" | 5 #include "components/sessions/ios/ios_live_tab.h" |
| 6 #include "ios/web/public/navigation_manager.h" | 6 #include "ios/web/public/navigation_manager.h" |
| 7 | 7 |
| 8 namespace { | 8 namespace { |
| 9 const char kIOSLiveTabWebStateUserDataKey[] = "ios_live_tab"; | 9 const char kIOSLiveTabWebStateUserDataKey[] = "ios_live_tab"; |
| 10 } | 10 } |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 sessions::SerializedNavigationEntry IOSLiveTab::GetPendingEntry() { | 48 sessions::SerializedNavigationEntry IOSLiveTab::GetPendingEntry() { |
| 49 return sessions::IOSSerializedNavigationBuilder::FromNavigationItem( | 49 return sessions::IOSSerializedNavigationBuilder::FromNavigationItem( |
| 50 GetPendingEntryIndex(), *navigation_manager()->GetPendingItem()); | 50 GetPendingEntryIndex(), *navigation_manager()->GetPendingItem()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 int IOSLiveTab::GetEntryCount() { | 53 int IOSLiveTab::GetEntryCount() { |
| 54 return navigation_manager()->GetItemCount(); | 54 return navigation_manager()->GetItemCount(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void IOSLiveTab::LoadIfNecessary() { | |
| 58 navigation_manager()->LoadIfNecessary(); | |
| 59 } | |
| 60 | |
| 61 const std::string& IOSLiveTab::GetUserAgentOverride() const { | 57 const std::string& IOSLiveTab::GetUserAgentOverride() const { |
| 62 // Dynamic user agent overrides are not supported on iOS. | 58 // Dynamic user agent overrides are not supported on iOS. |
| 63 return user_agent_override_; | 59 return user_agent_override_; |
| 64 } | 60 } |
| 65 | 61 |
| 66 } // namespace sessions | 62 } // namespace sessions |
| OLD | NEW |