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

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

Issue 7134026: Multi-tab: Renaming TabStripModel::GetSelectedTabContents to GetActiveTabContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Renaming in tab_strip_controller.mm too. Created 9 years, 6 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after
1020 int Browser::active_index() const { 1020 int Browser::active_index() const {
1021 return tab_handler_->GetTabStripModel()->active_index(); 1021 return tab_handler_->GetTabStripModel()->active_index();
1022 } 1022 }
1023 1023
1024 int Browser::GetIndexOfController( 1024 int Browser::GetIndexOfController(
1025 const NavigationController* controller) const { 1025 const NavigationController* controller) const {
1026 return tab_handler_->GetTabStripModel()->GetIndexOfController(controller); 1026 return tab_handler_->GetTabStripModel()->GetIndexOfController(controller);
1027 } 1027 }
1028 1028
1029 TabContentsWrapper* Browser::GetSelectedTabContentsWrapper() const { 1029 TabContentsWrapper* Browser::GetSelectedTabContentsWrapper() const {
1030 return tabstrip_model()->GetSelectedTabContents(); 1030 return tabstrip_model()->GetActiveTabContents();
1031 } 1031 }
1032 1032
1033 TabContentsWrapper* Browser::GetTabContentsWrapperAt(int index) const { 1033 TabContentsWrapper* Browser::GetTabContentsWrapperAt(int index) const {
1034 return tabstrip_model()->GetTabContentsAt(index); 1034 return tabstrip_model()->GetTabContentsAt(index);
1035 } 1035 }
1036 1036
1037 TabContents* Browser::GetSelectedTabContents() const { 1037 TabContents* Browser::GetSelectedTabContents() const {
1038 TabContentsWrapper* wrapper = GetSelectedTabContentsWrapper(); 1038 TabContentsWrapper* wrapper = GetSelectedTabContentsWrapper();
1039 if (wrapper) 1039 if (wrapper)
1040 return wrapper->tab_contents(); 1040 return wrapper->tab_contents();
(...skipping 3663 matching lines...) Expand 10 before | Expand all | Expand 10 after
4704 TabContents* current_tab = GetSelectedTabContents(); 4704 TabContents* current_tab = GetSelectedTabContents();
4705 if (current_tab) { 4705 if (current_tab) {
4706 content_restrictions = current_tab->content_restrictions(); 4706 content_restrictions = current_tab->content_restrictions();
4707 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); 4707 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
4708 // See comment in UpdateCommandsForTabState about why we call url(). 4708 // See comment in UpdateCommandsForTabState about why we call url().
4709 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) 4709 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL()))
4710 content_restrictions |= CONTENT_RESTRICTION_SAVE; 4710 content_restrictions |= CONTENT_RESTRICTION_SAVE;
4711 } 4711 }
4712 return content_restrictions; 4712 return content_restrictions;
4713 } 4713 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698