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

Side by Side Diff: chrome/browser/ui/sync/tab_contents_synced_tab_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" 5 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sessions/session_tab_helper.h" 9 #include "chrome/browser/sessions/session_tab_helper.h"
10 #include "components/sync_driver/glue/synced_window_delegate.h" 10 #include "components/sync_driver/glue/synced_window_delegate.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 std::string TabContentsSyncedTabDelegate::GetExtensionAppId() const { 50 std::string TabContentsSyncedTabDelegate::GetExtensionAppId() const {
51 #if defined(ENABLE_EXTENSIONS) 51 #if defined(ENABLE_EXTENSIONS)
52 const scoped_refptr<const extensions::Extension> extension_app( 52 const scoped_refptr<const extensions::Extension> extension_app(
53 extensions::TabHelper::FromWebContents(web_contents_)->extension_app()); 53 extensions::TabHelper::FromWebContents(web_contents_)->extension_app());
54 if (extension_app.get()) 54 if (extension_app.get())
55 return extension_app->id(); 55 return extension_app->id();
56 #endif 56 #endif
57 return std::string(); 57 return std::string();
58 } 58 }
59 59
60 bool TabContentsSyncedTabDelegate::IsInitialBlankNavigation() const {
61 return web_contents_->GetController().IsInitialBlankNavigation();
62 }
63
60 int TabContentsSyncedTabDelegate::GetCurrentEntryIndex() const { 64 int TabContentsSyncedTabDelegate::GetCurrentEntryIndex() const {
61 return web_contents_->GetController().GetCurrentEntryIndex(); 65 return web_contents_->GetController().GetCurrentEntryIndex();
62 } 66 }
63 67
64 int TabContentsSyncedTabDelegate::GetEntryCount() const { 68 int TabContentsSyncedTabDelegate::GetEntryCount() const {
65 return web_contents_->GetController().GetEntryCount(); 69 return web_contents_->GetController().GetEntryCount();
66 } 70 }
67 71
68 int TabContentsSyncedTabDelegate::GetPendingEntryIndex() const { 72 int TabContentsSyncedTabDelegate::GetPendingEntryIndex() const {
69 return web_contents_->GetController().GetPendingEntryIndex(); 73 return web_contents_->GetController().GetPendingEntryIndex();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 return web_contents_; 115 return web_contents_;
112 } 116 }
113 117
114 int TabContentsSyncedTabDelegate::GetSyncId() const { 118 int TabContentsSyncedTabDelegate::GetSyncId() const {
115 return sync_session_id_; 119 return sync_session_id_;
116 } 120 }
117 121
118 void TabContentsSyncedTabDelegate::SetSyncId(int sync_id) { 122 void TabContentsSyncedTabDelegate::SetSyncId(int sync_id) {
119 sync_session_id_ = sync_id; 123 sync_session_id_ = sync_id;
120 } 124 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h ('k') | components/favicon/content/content_favicon_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698