| 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/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_finder.h" | 8 #include "chrome/browser/ui/browser_finder.h" |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 std::string BrowserTabRestoreServiceDelegate::GetAppName() const { | 32 std::string BrowserTabRestoreServiceDelegate::GetAppName() const { |
| 33 return browser_->app_name(); | 33 return browser_->app_name(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 WebContents* BrowserTabRestoreServiceDelegate::GetWebContentsAt( | 36 WebContents* BrowserTabRestoreServiceDelegate::GetWebContentsAt( |
| 37 int index) const { | 37 int index) const { |
| 38 return browser_->GetWebContentsAt(index); | 38 return browser_->GetWebContentsAt(index); |
| 39 } | 39 } |
| 40 | 40 |
| 41 WebContents* BrowserTabRestoreServiceDelegate::GetSelectedWebContents() const { | 41 WebContents* BrowserTabRestoreServiceDelegate::GetActiveWebContents() const { |
| 42 return browser_->GetSelectedWebContents(); | 42 return browser_->GetActiveWebContents(); |
| 43 } | 43 } |
| 44 | 44 |
| 45 bool BrowserTabRestoreServiceDelegate::IsTabPinned(int index) const { | 45 bool BrowserTabRestoreServiceDelegate::IsTabPinned(int index) const { |
| 46 return browser_->IsTabPinned(index); | 46 return browser_->IsTabPinned(index); |
| 47 } | 47 } |
| 48 | 48 |
| 49 WebContents* BrowserTabRestoreServiceDelegate::AddRestoredTab( | 49 WebContents* BrowserTabRestoreServiceDelegate::AddRestoredTab( |
| 50 const std::vector<TabNavigation>& navigations, | 50 const std::vector<TabNavigation>& navigations, |
| 51 int tab_index, | 51 int tab_index, |
| 52 int selected_navigation, | 52 int selected_navigation, |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 | 108 |
| 109 // static | 109 // static |
| 110 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( | 110 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( |
| 111 SessionID::id_type desired_id) { | 111 SessionID::id_type desired_id) { |
| 112 Browser* browser = browser::FindBrowserWithID(desired_id); | 112 Browser* browser = browser::FindBrowserWithID(desired_id); |
| 113 if (browser) | 113 if (browser) |
| 114 return browser->tab_restore_service_delegate(); | 114 return browser->tab_restore_service_delegate(); |
| 115 else | 115 else |
| 116 return NULL; | 116 return NULL; |
| 117 } | 117 } |
| OLD | NEW |