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/content/content_live_tab.h" | 5 #include "components/sessions/content/content_live_tab.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "components/sessions/content/content_platform_specific_tab_data.h" | 8 #include "components/sessions/content/content_platform_specific_tab_data.h" |
9 | 9 |
10 namespace { | 10 namespace { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 return sessions::ContentSerializedNavigationBuilder::FromNavigationEntry( | 51 return sessions::ContentSerializedNavigationBuilder::FromNavigationEntry( |
52 GetPendingEntryIndex(), *navigation_controller().GetPendingEntry()); | 52 GetPendingEntryIndex(), *navigation_controller().GetPendingEntry()); |
53 } | 53 } |
54 | 54 |
55 int ContentLiveTab::GetEntryCount() { | 55 int ContentLiveTab::GetEntryCount() { |
56 return navigation_controller().GetEntryCount(); | 56 return navigation_controller().GetEntryCount(); |
57 } | 57 } |
58 | 58 |
59 std::unique_ptr<sessions::PlatformSpecificTabData> | 59 std::unique_ptr<sessions::PlatformSpecificTabData> |
60 ContentLiveTab::GetPlatformSpecificTabData() { | 60 ContentLiveTab::GetPlatformSpecificTabData() { |
61 return base::WrapUnique( | 61 return base::MakeUnique<sessions::ContentPlatformSpecificTabData>( |
62 new sessions::ContentPlatformSpecificTabData(web_contents())); | 62 web_contents()); |
63 } | 63 } |
64 | 64 |
65 void ContentLiveTab::LoadIfNecessary() { | 65 void ContentLiveTab::LoadIfNecessary() { |
66 navigation_controller().LoadIfNecessary(); | 66 navigation_controller().LoadIfNecessary(); |
67 } | 67 } |
68 | 68 |
69 const std::string& ContentLiveTab::GetUserAgentOverride() const { | 69 const std::string& ContentLiveTab::GetUserAgentOverride() const { |
70 return web_contents()->GetUserAgentOverride(); | 70 return web_contents()->GetUserAgentOverride(); |
71 } | 71 } |
72 | 72 |
73 } // namespace sessions | 73 } // namespace sessions |
OLD | NEW |