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

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

Issue 23020009: TabBase: Add ContentView/NativePage ownership (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase! Created 7 years, 3 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 12 matching lines...) Expand all
23 : web_contents_(NULL), tab_android_(tab_android) {} 23 : web_contents_(NULL), tab_android_(tab_android) {}
24 24
25 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {} 25 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {}
26 26
27 SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const { 27 SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const {
28 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 28 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
29 ->GetWindowId(); 29 ->GetWindowId();
30 } 30 }
31 31
32 SessionID::id_type SyncedTabDelegateAndroid::GetSessionId() const { 32 SessionID::id_type SyncedTabDelegateAndroid::GetSessionId() const {
33 return tab_android_->id().id(); 33 return tab_android_->session_id().id();
34 } 34 }
35 35
36 bool SyncedTabDelegateAndroid::IsBeingDestroyed() const { 36 bool SyncedTabDelegateAndroid::IsBeingDestroyed() const {
37 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 37 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
38 ->IsBeingDestroyed(); 38 ->IsBeingDestroyed();
39 } 39 }
40 40
41 Profile* SyncedTabDelegateAndroid::profile() const { 41 Profile* SyncedTabDelegateAndroid::profile() const {
42 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) 42 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_)
43 ->profile(); 43 ->profile();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
« no previous file with comments | « chrome/browser/android/tab_android_test_stubs.cc ('k') | chrome/browser/ui/android/tab_model/tab_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698