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

Unified Diff: chrome/browser/ui/cocoa/applescript/window_applescript.mm

Issue 11419276: Remove tabstrip wrappers in browser_tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: gtk Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/applescript/window_applescript.mm
diff --git a/chrome/browser/ui/cocoa/applescript/window_applescript.mm b/chrome/browser/ui/cocoa/applescript/window_applescript.mm
index 93409d5766caec9082c0302f5352ad673acdfc7b..31b985198dfde0d41ec68fb611086a947afa8b98 100644
--- a/chrome/browser/ui/cocoa/applescript/window_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/window_applescript.mm
@@ -117,8 +117,8 @@
- (void)setActiveTabIndex:(NSNumber*)anActiveTabIndex {
// Note: applescript is 1-based, that is lists begin with index 1.
int atIndex = [anActiveTabIndex intValue] - 1;
- if (atIndex >= 0 && atIndex < browser_->tab_count())
- chrome::ActivateTabAt(browser_, atIndex, true);
+ if (atIndex >= 0 && atIndex < browser_->tab_strip_model()->count())
+ browser_->tab_strip_model()->ActivateTabAt(atIndex, true);
else
AppleScript::SetError(AppleScript::errInvalidTabIndex);
}
@@ -139,9 +139,8 @@
- (TabAppleScript*)activeTab {
TabAppleScript* currentTab =
- [[[TabAppleScript alloc]
- initWithWebContents:chrome::GetActiveWebContents(browser_)]
- autorelease];
+ [[[TabAppleScript alloc] initWithWebContents:
+ browser_->tab_strip_model()->GetActiveWebContents()] autorelease];
[currentTab setContainer:self
property:AppleScript::kTabsProperty];
return currentTab;
@@ -153,7 +152,8 @@
for (int i = 0; i < browser_->tab_count(); ++i) {
// Check to see if tab is closing.
- content::WebContents* webContents = chrome::GetWebContentsAt(browser_, i);
+ content::WebContents* webContents =
+ browser_->tab_strip_model()->GetWebContentsAt(i);
if (webContents->IsBeingDestroyed()) {
continue;
}
@@ -203,7 +203,8 @@
}
- (void)removeFromTabsAtIndex:(int)index {
- chrome::CloseWebContents(browser_, chrome::GetWebContentsAt(browser_, index));
+ chrome::CloseWebContents(
+ browser_, browser_->tab_strip_model()->GetWebContentsAt(index));
}
- (NSNumber*)orderedIndex {
« no previous file with comments | « chrome/browser/ui/browser_tabstrip.cc ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698