OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/tab_strip_controller.h" | 5 #import "chrome/browser/ui/cocoa/tab_strip_controller.h" |
6 | 6 |
7 #import <QuartzCore/QuartzCore.h> | 7 #import <QuartzCore/QuartzCore.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 #include <string> | 10 #include <string> |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 [super dealloc]; | 423 [super dealloc]; |
424 } | 424 } |
425 | 425 |
426 + (CGFloat)defaultTabHeight { | 426 + (CGFloat)defaultTabHeight { |
427 return 25.0; | 427 return 25.0; |
428 } | 428 } |
429 | 429 |
430 + (CGFloat)defaultIndentForControls { | 430 + (CGFloat)defaultIndentForControls { |
431 // Default indentation leaves enough room so tabs don't overlap with the | 431 // Default indentation leaves enough room so tabs don't overlap with the |
432 // window controls. | 432 // window controls. |
433 return 64.0; | 433 return 68.0; |
434 } | 434 } |
435 | 435 |
436 // Finds the TabContentsController associated with the given index into the tab | 436 // Finds the TabContentsController associated with the given index into the tab |
437 // model and swaps out the sole child of the contentArea to display its | 437 // model and swaps out the sole child of the contentArea to display its |
438 // contents. | 438 // contents. |
439 - (void)swapInTabAtIndex:(NSInteger)modelIndex { | 439 - (void)swapInTabAtIndex:(NSInteger)modelIndex { |
440 DCHECK(modelIndex >= 0 && modelIndex < tabStripModel_->count()); | 440 DCHECK(modelIndex >= 0 && modelIndex < tabStripModel_->count()); |
441 NSInteger index = [self indexFromModelIndex:modelIndex]; | 441 NSInteger index = [self indexFromModelIndex:modelIndex]; |
442 TabContentsController* controller = [tabContentsArray_ objectAtIndex:index]; | 442 TabContentsController* controller = [tabContentsArray_ objectAtIndex:index]; |
443 | 443 |
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1890 NSInteger index = [self indexFromModelIndex:modelIndex]; | 1890 NSInteger index = [self indexFromModelIndex:modelIndex]; |
1891 BrowserWindowController* controller = | 1891 BrowserWindowController* controller = |
1892 (BrowserWindowController*)[[switchView_ window] windowController]; | 1892 (BrowserWindowController*)[[switchView_ window] windowController]; |
1893 DCHECK(index >= 0); | 1893 DCHECK(index >= 0); |
1894 if (index >= 0) { | 1894 if (index >= 0) { |
1895 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; | 1895 [controller setTab:[self viewAtIndex:index] isDraggable:YES]; |
1896 } | 1896 } |
1897 } | 1897 } |
1898 | 1898 |
1899 @end | 1899 @end |
OLD | NEW |