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

Side by Side Diff: chrome/browser/sync/glue/synced_tab_delegate_android.cc

Issue 22882007: Remove GetActiveEntry usage from chrome/browser/ui. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased on ToT. Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/sync/glue/synced_tab_delegate_android.h" 5 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "chrome/browser/android/tab_android.h" 8 #include "chrome/browser/android/tab_android.h"
9 #include "chrome/browser/extensions/tab_helper.h" 9 #include "chrome/browser/extensions/tab_helper.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 NavigationEntry* SyncedTabDelegateAndroid::GetPendingEntry() const { 66 NavigationEntry* SyncedTabDelegateAndroid::GetPendingEntry() const {
67 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 67 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
68 ->GetPendingEntry(); 68 ->GetPendingEntry();
69 } 69 }
70 70
71 NavigationEntry* SyncedTabDelegateAndroid::GetEntryAtIndex(int i) const { 71 NavigationEntry* SyncedTabDelegateAndroid::GetEntryAtIndex(int i) const {
72 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 72 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
73 ->GetEntryAtIndex(i); 73 ->GetEntryAtIndex(i);
74 } 74 }
75 75
76 NavigationEntry* SyncedTabDelegateAndroid::GetActiveEntry() const { 76 NavigationEntry* SyncedTabDelegateAndroid::GetVisibleEntry() const {
77 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 77 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
78 ->GetActiveEntry(); 78 ->GetVisibleEntry();
79 } 79 }
80 80
81 bool SyncedTabDelegateAndroid::IsPinned() const { 81 bool SyncedTabDelegateAndroid::IsPinned() const {
82 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 82 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
83 ->IsPinned(); 83 ->IsPinned();
84 } 84 }
85 85
86 bool SyncedTabDelegateAndroid::HasWebContents() const { 86 bool SyncedTabDelegateAndroid::HasWebContents() const {
87 return web_contents_ != NULL; 87 return web_contents_ != NULL;
88 } 88 }
(...skipping 29 matching lines...) Expand all
118 tab_android_->SetSyncId(sync_id); 118 tab_android_->SetSyncId(sync_id);
119 } 119 }
120 120
121 // static 121 // static
122 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( 122 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents(
123 content::WebContents* web_contents) { 123 content::WebContents* web_contents) {
124 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); 124 TabAndroid* tab = TabAndroid::FromWebContents(web_contents);
125 return tab ? tab->GetSyncedTabDelegate() : NULL; 125 return tab ? tab->GetSyncedTabDelegate() : NULL;
126 } 126 }
127 } // namespace browser_sync 127 } // namespace browser_sync
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698