Chromium Code Reviews

Side by Side Diff: chrome/browser/cocoa/tab_strip_controller.mm

Issue 149094: Removes our homespun grow box and replaces it with the... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/cocoa/tab_strip_controller.h" 5 #import "chrome/browser/cocoa/tab_strip_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 561 matching lines...)
572 // is no placeholder, it will go at the end. Used when dragging from another 572 // is no placeholder, it will go at the end. Used when dragging from another
573 // window when we don't have access to the TabContents as part of our strip. 573 // window when we don't have access to the TabContents as part of our strip.
574 - (void)dropTabContents:(TabContents*)contents { 574 - (void)dropTabContents:(TabContents*)contents {
575 int index = [self indexOfPlaceholder]; 575 int index = [self indexOfPlaceholder];
576 576
577 // Insert it into this tab strip. We want it in the foreground and to not 577 // Insert it into this tab strip. We want it in the foreground and to not
578 // inherit the current tab's group. 578 // inherit the current tab's group.
579 tabModel_->InsertTabContentsAt(index, contents, true, false); 579 tabModel_->InsertTabContentsAt(index, contents, true, false);
580 } 580 }
581 581
582 // Return the rect, in WebKit coordinates (flipped), of the window's grow box
583 // in the coordinate system of the content area of the currently selected tab.
584 - (NSRect)selectedTabGrowBoxRect {
585 int selectedIndex = tabModel_->selected_index();
586 if (selectedIndex == TabStripModel::kNoTab) {
587 // When the window is initially being constructed, there may be no currently
588 // selected tab, so pick the first one. If there aren't any, just bail with
589 // an empty rect.
590 selectedIndex = 0;
591 }
592 TabContentsController* selectedController =
593 [tabContentsArray_ objectAtIndex:selectedIndex];
594 if (!selectedController)
595 return NSZeroRect;
596 return [selectedController growBoxRect];
597 }
598
599 @end 582 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/tab_strip_controller.h ('k') | chrome/browser/cocoa/tab_strip_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine