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

Side by Side Diff: chrome/browser/ui/browser_tab_restore_service_delegate.cc

Issue 9015022: Replace most of Browser::GetSelectedTabContents calls into Browser::GetSelectedWebContents. I've ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 months 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 | Annotate | Revision Log
OLDNEW
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 using content::WebContents;
13
12 void BrowserTabRestoreServiceDelegate::ShowBrowserWindow() { 14 void BrowserTabRestoreServiceDelegate::ShowBrowserWindow() {
13 browser_->window()->Show(); 15 browser_->window()->Show();
14 } 16 }
15 17
16 const SessionID& BrowserTabRestoreServiceDelegate::GetSessionID() const { 18 const SessionID& BrowserTabRestoreServiceDelegate::GetSessionID() const {
17 return browser_->session_id(); 19 return browser_->session_id();
18 } 20 }
19 21
20 int BrowserTabRestoreServiceDelegate::GetTabCount() const { 22 int BrowserTabRestoreServiceDelegate::GetTabCount() const {
21 return browser_->tab_count(); 23 return browser_->tab_count();
22 } 24 }
23 25
24 int BrowserTabRestoreServiceDelegate::GetSelectedIndex() const { 26 int BrowserTabRestoreServiceDelegate::GetSelectedIndex() const {
25 return browser_->active_index(); 27 return browser_->active_index();
26 } 28 }
27 29
28 TabContents* BrowserTabRestoreServiceDelegate::GetTabContentsAt( 30 TabContents* BrowserTabRestoreServiceDelegate::GetTabContentsAt(
29 int index) const { 31 int index) const {
30 return browser_->GetTabContentsAt(index); 32 return browser_->GetTabContentsAt(index);
31 } 33 }
32 34
33 TabContents* BrowserTabRestoreServiceDelegate::GetSelectedTabContents() const { 35 WebContents* BrowserTabRestoreServiceDelegate::GetSelectedWebContents() const {
34 return browser_->GetSelectedTabContents(); 36 return browser_->GetSelectedWebContents();
35 } 37 }
36 38
37 bool BrowserTabRestoreServiceDelegate::IsTabPinned(int index) const { 39 bool BrowserTabRestoreServiceDelegate::IsTabPinned(int index) const {
38 return browser_->IsTabPinned(index); 40 return browser_->IsTabPinned(index);
39 } 41 }
40 42
41 TabContents* BrowserTabRestoreServiceDelegate::AddRestoredTab( 43 TabContents* BrowserTabRestoreServiceDelegate::AddRestoredTab(
42 const std::vector<TabNavigation>& navigations, 44 const std::vector<TabNavigation>& navigations,
43 int tab_index, 45 int tab_index,
44 int selected_navigation, 46 int selected_navigation,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 93
92 // static 94 // static
93 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID( 95 TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateWithID(
94 SessionID::id_type desired_id) { 96 SessionID::id_type desired_id) {
95 Browser* browser = BrowserList::FindBrowserWithID(desired_id); 97 Browser* browser = BrowserList::FindBrowserWithID(desired_id);
96 if (browser) 98 if (browser)
97 return browser->tab_restore_service_delegate(); 99 return browser->tab_restore_service_delegate();
98 else 100 else
99 return NULL; 101 return NULL;
100 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_tab_restore_service_delegate.h ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698