| OLD | NEW |
| 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/browser_synced_window_delegate.h" | 5 #include "chrome/browser/ui/sync/browser_synced_window_delegate.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/browser_finder.h" | 10 #include "chrome/browser/ui/browser_finder.h" |
| 11 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 11 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 12 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 13 #include "components/sessions/core/session_id.h" | |
| 14 | 13 |
| 15 BrowserSyncedWindowDelegate::BrowserSyncedWindowDelegate(Browser* browser) | 14 BrowserSyncedWindowDelegate::BrowserSyncedWindowDelegate(Browser* browser) |
| 16 : browser_(browser) {} | 15 : browser_(browser) {} |
| 17 | 16 |
| 18 BrowserSyncedWindowDelegate::~BrowserSyncedWindowDelegate() {} | 17 BrowserSyncedWindowDelegate::~BrowserSyncedWindowDelegate() {} |
| 19 | 18 |
| 20 bool BrowserSyncedWindowDelegate::IsTabPinned( | 19 bool BrowserSyncedWindowDelegate::IsTabPinned( |
| 21 const sync_sessions::SyncedTabDelegate* tab) const { | 20 const sync_sessions::SyncedTabDelegate* tab) const { |
| 22 for (int i = 0; i < browser_->tab_strip_model()->count(); i++) { | 21 for (int i = 0; i < browser_->tab_strip_model()->count(); i++) { |
| 23 sync_sessions::SyncedTabDelegate* current = GetTabAt(i); | 22 sync_sessions::SyncedTabDelegate* current = GetTabAt(i); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 68 |
| 70 bool BrowserSyncedWindowDelegate::IsSessionRestoreInProgress() const { | 69 bool BrowserSyncedWindowDelegate::IsSessionRestoreInProgress() const { |
| 71 return false; | 70 return false; |
| 72 } | 71 } |
| 73 | 72 |
| 74 bool BrowserSyncedWindowDelegate::ShouldSync() const { | 73 bool BrowserSyncedWindowDelegate::ShouldSync() const { |
| 75 if (IsApp()) | 74 if (IsApp()) |
| 76 return false; | 75 return false; |
| 77 return IsTypeTabbed() || IsTypePopup(); | 76 return IsTypeTabbed() || IsTypePopup(); |
| 78 } | 77 } |
| OLD | NEW |