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

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

Issue 2479683006: [Sync] Add support for identifying tabbed activites (Closed)
Patch Set: Self review Created 4 years, 1 month 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/sync/glue/synced_window_delegate_android.h" 5 #include "chrome/browser/sync/glue/synced_window_delegate_android.h"
6 6
7 #include "chrome/browser/android/tab_android.h" 7 #include "chrome/browser/android/tab_android.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h" 9 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h"
10 #include "chrome/browser/ui/android/tab_model/tab_model.h" 10 #include "chrome/browser/ui/android/tab_model/tab_model.h"
11 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" 11 #include "chrome/browser/ui/android/tab_model/tab_model_list.h"
12 #include "content/public/browser/web_contents.h" 12 #include "content/public/browser/web_contents.h"
13 13
14 using sync_sessions::SyncedTabDelegate; 14 using sync_sessions::SyncedTabDelegate;
15 15
16 namespace browser_sync { 16 namespace browser_sync {
17 17
18 // SyncedWindowDelegateAndroid implementations 18 // SyncedWindowDelegateAndroid implementations
19 19
20 SyncedWindowDelegateAndroid::SyncedWindowDelegateAndroid( 20 SyncedWindowDelegateAndroid::SyncedWindowDelegateAndroid(
21 TabModel* tab_model) 21 TabModel* tab_model,
22 : tab_model_(tab_model) {} 22 bool is_tabbed_activity)
23 : tab_model_(tab_model), is_tabbed_activity_(is_tabbed_activity) {}
23 24
24 SyncedWindowDelegateAndroid::~SyncedWindowDelegateAndroid() {} 25 SyncedWindowDelegateAndroid::~SyncedWindowDelegateAndroid() {}
25 26
26 bool SyncedWindowDelegateAndroid::HasWindow() const { 27 bool SyncedWindowDelegateAndroid::HasWindow() const {
27 return !tab_model_->IsOffTheRecord(); 28 return !tab_model_->IsOffTheRecord();
28 } 29 }
29 30
30 SessionID::id_type SyncedWindowDelegateAndroid::GetSessionId() const { 31 SessionID::id_type SyncedWindowDelegateAndroid::GetSessionId() const {
31 return tab_model_->GetSessionId(); 32 return tab_model_->GetSessionId();
32 } 33 }
33 34
34 int SyncedWindowDelegateAndroid::GetTabCount() const { 35 int SyncedWindowDelegateAndroid::GetTabCount() const {
35 return tab_model_->GetTabCount(); 36 return tab_model_->GetTabCount();
36 } 37 }
37 38
38 int SyncedWindowDelegateAndroid::GetActiveIndex() const { 39 int SyncedWindowDelegateAndroid::GetActiveIndex() const {
39 return tab_model_->GetActiveIndex(); 40 return tab_model_->GetActiveIndex();
40 } 41 }
41 42
42 bool SyncedWindowDelegateAndroid::IsApp() const { 43 bool SyncedWindowDelegateAndroid::IsApp() const {
43 return false; 44 return false;
44 } 45 }
45 46
46 bool SyncedWindowDelegateAndroid::IsTypeTabbed() const { 47 bool SyncedWindowDelegateAndroid::IsTypeTabbed() const {
47 return true; 48 return is_tabbed_activity_;
48 } 49 }
49 50
50 bool SyncedWindowDelegateAndroid::IsTypePopup() const { 51 bool SyncedWindowDelegateAndroid::IsTypePopup() const {
51 return false; 52 return false;
52 } 53 }
53 54
54 bool SyncedWindowDelegateAndroid::IsTabPinned( 55 bool SyncedWindowDelegateAndroid::IsTabPinned(
55 const SyncedTabDelegate* tab) const { 56 const SyncedTabDelegate* tab) const {
56 return false; 57 return false;
57 } 58 }
(...skipping 11 matching lines...) Expand all
69 70
70 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { 71 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const {
71 return tab_model_->IsSessionRestoreInProgress(); 72 return tab_model_->IsSessionRestoreInProgress();
72 } 73 }
73 74
74 bool SyncedWindowDelegateAndroid::ShouldSync() const { 75 bool SyncedWindowDelegateAndroid::ShouldSync() const {
75 return true; 76 return true;
76 } 77 }
77 78
78 } // namespace browser_sync 79 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/synced_window_delegate_android.h ('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