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

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

Issue 11030004: Switch TabContentsSyncedTabDelegate to use WebContentsUserData. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, added TODO Created 8 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 (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/sync/glue/synced_window_delegate_android.h" 5 #include "chrome/browser/sync/glue/synced_window_delegate_android.h"
6 6
7 #include "chrome/browser/profiles/profile.h" 7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/android/tab_model/tab_model.h" 8 #include "chrome/browser/ui/android/tab_model/tab_model.h"
9 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" 9 #include "chrome/browser/ui/android/tab_model/tab_model_list.h"
10 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h"
10 #include "chrome/browser/ui/tab_contents/tab_contents.h" 11 #include "chrome/browser/ui/tab_contents/tab_contents.h"
11 #include "chrome/browser/sessions/session_id.h" 12 #include "chrome/browser/sessions/session_id.h"
12 13
13 namespace browser_sync { 14 namespace browser_sync {
14 15
15 // SyncedWindowDelegate implementations 16 // SyncedWindowDelegate implementations
16 17
17 const std::set<SyncedWindowDelegate*> 18 const std::set<SyncedWindowDelegate*>
18 SyncedWindowDelegate::GetSyncedWindowDelegates() { 19 SyncedWindowDelegate::GetSyncedWindowDelegates() {
19 std::set<SyncedWindowDelegate*> synced_window_delegates; 20 std::set<SyncedWindowDelegate*> synced_window_delegates;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 return false; 71 return false;
71 } 72 }
72 73
73 bool SyncedWindowDelegateAndroid::IsTabPinned( 74 bool SyncedWindowDelegateAndroid::IsTabPinned(
74 const SyncedTabDelegate* tab) const { 75 const SyncedTabDelegate* tab) const {
75 return false; 76 return false;
76 } 77 }
77 78
78 SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const { 79 SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const {
79 TabContents* tab_contents = tab_model_->GetTabContentsAt(index); 80 TabContents* tab_contents = tab_model_->GetTabContentsAt(index);
80 return tab_contents ? tab_contents->synced_tab_delegate() : NULL; 81 return tab_contents ? TabContentsSyncedTabDelegate::FromWebContents(
82 tab_contents->web_contents()) : NULL;
81 } 83 }
82 84
83 SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const { 85 SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const {
84 return tab_model_->GetTabIdAt(index); 86 return tab_model_->GetTabIdAt(index);
85 } 87 }
86 88
87 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { 89 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const {
88 return tab_model_->IsSessionRestoreInProgress(); 90 return tab_model_->IsSessionRestoreInProgress();
89 } 91 }
90 92
91 } // namespace browser_sync 93 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/synced_tab_delegate.h ('k') | chrome/browser/ui/sync/browser_synced_window_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698