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

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

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 #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 10 matching lines...) Expand all
21 } 21 }
22 22
23 return static_cast<IOSLiveTab*>( 23 return static_cast<IOSLiveTab*>(
24 web_state->GetUserData(kIOSLiveTabWebStateUserDataKey)); 24 web_state->GetUserData(kIOSLiveTabWebStateUserDataKey));
25 } 25 }
26 26
27 IOSLiveTab::IOSLiveTab(web::WebState* web_state) : web_state_(web_state) {} 27 IOSLiveTab::IOSLiveTab(web::WebState* web_state) : web_state_(web_state) {}
28 28
29 IOSLiveTab::~IOSLiveTab() {} 29 IOSLiveTab::~IOSLiveTab() {}
30 30
31 bool IOSLiveTab::IsInitialNavigation() { 31 bool IOSLiveTab::IsInitialBlankNavigation() {
32 return navigation_manager()->GetEntryCount() == 0; 32 return navigation_manager()->GetEntryCount() == 0;
33 } 33 }
34 34
35 int IOSLiveTab::GetCurrentEntryIndex() { 35 int IOSLiveTab::GetCurrentEntryIndex() {
36 return navigation_manager()->GetCurrentEntryIndex(); 36 return navigation_manager()->GetCurrentEntryIndex();
37 } 37 }
38 38
39 int IOSLiveTab::GetPendingEntryIndex() { 39 int IOSLiveTab::GetPendingEntryIndex() {
40 return navigation_manager()->GetPendingItemIndex(); 40 return navigation_manager()->GetPendingItemIndex();
41 } 41 }
(...skipping 15 matching lines...) Expand all
57 void IOSLiveTab::LoadIfNecessary() { 57 void IOSLiveTab::LoadIfNecessary() {
58 navigation_manager()->LoadIfNecessary(); 58 navigation_manager()->LoadIfNecessary();
59 } 59 }
60 60
61 const std::string& IOSLiveTab::GetUserAgentOverride() const { 61 const std::string& IOSLiveTab::GetUserAgentOverride() const {
62 // Dynamic user agent overrides are not supported on iOS. 62 // Dynamic user agent overrides are not supported on iOS.
63 return user_agent_override_; 63 return user_agent_override_;
64 } 64 }
65 65
66 } // namespace sessions 66 } // namespace sessions
OLDNEW
« no previous file with comments | « components/sessions/ios/ios_live_tab.h ('k') | content/browser/child_process_launcher_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698