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/sessions/session_id.h" | 9 #include "chrome/browser/sessions/session_id.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 return false; | 51 return false; |
52 } | 52 } |
53 | 53 |
54 browser_sync::SyncedTabDelegate* BrowserSyncedWindowDelegate::GetTabAt( | 54 browser_sync::SyncedTabDelegate* BrowserSyncedWindowDelegate::GetTabAt( |
55 int index) const { | 55 int index) const { |
56 return TabContentsSyncedTabDelegate::FromWebContents( | 56 return TabContentsSyncedTabDelegate::FromWebContents( |
57 browser_->tab_strip_model()->GetWebContentsAt(index)); | 57 browser_->tab_strip_model()->GetWebContentsAt(index)); |
58 } | 58 } |
59 | 59 |
60 SessionID::id_type BrowserSyncedWindowDelegate::GetTabIdAt(int index) const { | 60 SessionID::id_type BrowserSyncedWindowDelegate::GetTabIdAt(int index) const { |
61 return GetTabAt(index)->GetSessionId(); | 61 return GetTabAt(index)->GetSessionId().id(); |
62 } | 62 } |
63 | 63 |
64 bool BrowserSyncedWindowDelegate::HasWindow() const { | 64 bool BrowserSyncedWindowDelegate::HasWindow() const { |
65 return browser_->window() != NULL; | 65 return browser_->window() != NULL; |
66 } | 66 } |
67 | 67 |
68 SessionID::id_type BrowserSyncedWindowDelegate::GetSessionId() const { | 68 SessionID::id_type BrowserSyncedWindowDelegate::GetSessionId() const { |
69 return browser_->session_id().id(); | 69 return browser_->session_id().id(); |
70 } | 70 } |
71 | 71 |
(...skipping 13 matching lines...) Expand all Loading... |
85 return browser_->is_type_tabbed(); | 85 return browser_->is_type_tabbed(); |
86 } | 86 } |
87 | 87 |
88 bool BrowserSyncedWindowDelegate::IsTypePopup() const { | 88 bool BrowserSyncedWindowDelegate::IsTypePopup() const { |
89 return browser_->is_type_popup(); | 89 return browser_->is_type_popup(); |
90 } | 90 } |
91 | 91 |
92 bool BrowserSyncedWindowDelegate::IsSessionRestoreInProgress() const { | 92 bool BrowserSyncedWindowDelegate::IsSessionRestoreInProgress() const { |
93 return false; | 93 return false; |
94 } | 94 } |
OLD | NEW |