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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 6821003: [Mac] First pass at multiple selection in the tabstrip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 8 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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <Carbon/Carbon.h> 7 #include <Carbon/Carbon.h>
8 8
9 #include "app/mac/scoped_nsdisable_screen_updates.h" 9 #include "app/mac/scoped_nsdisable_screen_updates.h"
10 #include "app/mac/nsimage_cache.h" 10 #include "app/mac/nsimage_cache.h"
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 // Get the new controller by asking the new window for its delegate. 1288 // Get the new controller by asking the new window for its delegate.
1289 BrowserWindowController* controller = 1289 BrowserWindowController* controller =
1290 reinterpret_cast<BrowserWindowController*>( 1290 reinterpret_cast<BrowserWindowController*>(
1291 [newBrowser->window()->GetNativeHandle() delegate]); 1291 [newBrowser->window()->GetNativeHandle() delegate]);
1292 DCHECK(controller && [controller isKindOfClass:[TabWindowController class]]); 1292 DCHECK(controller && [controller isKindOfClass:[TabWindowController class]]);
1293 1293
1294 // Force the added tab to the right size (remove stretching.) 1294 // Force the added tab to the right size (remove stretching.)
1295 tabRect.size.height = [TabStripController defaultTabHeight]; 1295 tabRect.size.height = [TabStripController defaultTabHeight];
1296 1296
1297 // And make sure we use the correct frame in the new view. 1297 // And make sure we use the correct frame in the new view.
1298 [[controller tabStripController] setFrameOfSelectedTab:tabRect]; 1298 [[controller tabStripController] setFrameOfActiveTab:tabRect];
1299 return controller; 1299 return controller;
1300 } 1300 }
1301 1301
1302 - (void)insertPlaceholderForTab:(TabView*)tab 1302 - (void)insertPlaceholderForTab:(TabView*)tab
1303 frame:(NSRect)frame 1303 frame:(NSRect)frame
1304 yStretchiness:(CGFloat)yStretchiness { 1304 yStretchiness:(CGFloat)yStretchiness {
1305 [super insertPlaceholderForTab:tab frame:frame yStretchiness:yStretchiness]; 1305 [super insertPlaceholderForTab:tab frame:frame yStretchiness:yStretchiness];
1306 [tabStripController_ insertPlaceholderForTab:tab 1306 [tabStripController_ insertPlaceholderForTab:tab
1307 frame:frame 1307 frame:frame
1308 yStretchiness:yStretchiness]; 1308 yStretchiness:yStretchiness];
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after
2168 2168
2169 - (BOOL)supportsBookmarkBar { 2169 - (BOOL)supportsBookmarkBar {
2170 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2170 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2171 } 2171 }
2172 2172
2173 - (BOOL)isNormalWindow { 2173 - (BOOL)isNormalWindow {
2174 return browser_->type() == Browser::TYPE_NORMAL; 2174 return browser_->type() == Browser::TYPE_NORMAL;
2175 } 2175 }
2176 2176
2177 @end // @implementation BrowserWindowController(WindowType) 2177 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/tabs/tab_controller.h » ('j') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698