OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_tab_restore_service_delegate.h" | 5 #include "chrome/browser/ui/browser_tab_restore_service_delegate.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/browser_list.h" | 8 #include "chrome/browser/ui/browser_list.h" |
9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
10 #include "content/browser/tab_contents/navigation_controller.h" | 10 #include "content/browser/tab_contents/navigation_controller.h" |
11 | 11 |
12 void BrowserTabRestoreServiceDelegate::ShowBrowserWindow() { | 12 void BrowserTabRestoreServiceDelegate::ShowBrowserWindow() { |
13 browser_->window()->Show(); | 13 browser_->window()->Show(BrowserWindow::SHOW_CONTEXT_NORMAL); |
14 } | 14 } |
15 | 15 |
16 const SessionID& BrowserTabRestoreServiceDelegate::GetSessionID() const { | 16 const SessionID& BrowserTabRestoreServiceDelegate::GetSessionID() const { |
17 return browser_->session_id(); | 17 return browser_->session_id(); |
18 } | 18 } |
19 | 19 |
20 int BrowserTabRestoreServiceDelegate::GetTabCount() const { | 20 int BrowserTabRestoreServiceDelegate::GetTabCount() const { |
21 return browser_->tab_count(); | 21 return browser_->tab_count(); |
22 } | 22 } |
23 | 23 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // static | 92 // static |
93 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( | 93 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( |
94 SessionID::id_type desired_id) { | 94 SessionID::id_type desired_id) { |
95 Browser* browser = BrowserList::FindBrowserWithID(desired_id); | 95 Browser* browser = BrowserList::FindBrowserWithID(desired_id); |
96 if (browser) | 96 if (browser) |
97 return browser->tab_restore_service_delegate(); | 97 return browser->tab_restore_service_delegate(); |
98 else | 98 else |
99 return NULL; | 99 return NULL; |
100 } | 100 } |
OLD | NEW |