OLD | NEW |
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 #include <Carbon/Carbon.h> | 5 #include <Carbon/Carbon.h> |
6 | 6 |
7 #include "base/mac_util.h" | 7 #include "base/mac_util.h" |
8 #include "base/scoped_nsdisable_screen_updates.h" | 8 #include "base/scoped_nsdisable_screen_updates.h" |
9 #import "base/scoped_nsobject.h" | 9 #import "base/scoped_nsobject.h" |
10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
792 // Create the new window with a single tab in its model, the one being | 792 // Create the new window with a single tab in its model, the one being |
793 // dragged. | 793 // dragged. |
794 DockInfo dockInfo; | 794 DockInfo dockInfo; |
795 Browser* newBrowser = | 795 Browser* newBrowser = |
796 browser_->tabstrip_model()->TearOffTabContents(contents, | 796 browser_->tabstrip_model()->TearOffTabContents(contents, |
797 browserRect, | 797 browserRect, |
798 dockInfo); | 798 dockInfo); |
799 | 799 |
800 // Get the new controller by asking the new window for its delegate. | 800 // Get the new controller by asking the new window for its delegate. |
801 BrowserWindowController* controller = | 801 BrowserWindowController* controller = |
802 [newBrowser->window()->GetNativeHandle() delegate]; | 802 reinterpret_cast<BrowserWindowController*>( |
| 803 [newBrowser->window()->GetNativeHandle() delegate]); |
803 DCHECK(controller && [controller isKindOfClass:[TabWindowController class]]); | 804 DCHECK(controller && [controller isKindOfClass:[TabWindowController class]]); |
804 | 805 |
805 // Force the added tab to the right size (remove stretching.) | 806 // Force the added tab to the right size (remove stretching.) |
806 tabRect.size.height = [TabStripController defaultTabHeight]; | 807 tabRect.size.height = [TabStripController defaultTabHeight]; |
807 | 808 |
808 // And make sure we use the correct frame in the new view. | 809 // And make sure we use the correct frame in the new view. |
809 [[controller tabStripController] setFrameOfSelectedTab:tabRect]; | 810 [[controller tabStripController] setFrameOfSelectedTab:tabRect]; |
810 return controller; | 811 return controller; |
811 } | 812 } |
812 | 813 |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1414 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); | 1415 provider->GetNSColor(BrowserThemeProvider::COLOR_TOOLBAR); |
1415 [theme setValue:toolbarBackgroundColor | 1416 [theme setValue:toolbarBackgroundColor |
1416 forAttribute:@"backgroundColor" | 1417 forAttribute:@"backgroundColor" |
1417 style:GTMThemeStyleToolBar | 1418 style:GTMThemeStyleToolBar |
1418 state:GTMThemeStateActiveWindow]; | 1419 state:GTMThemeStateActiveWindow]; |
1419 | 1420 |
1420 return theme; | 1421 return theme; |
1421 } | 1422 } |
1422 @end | 1423 @end |
1423 | 1424 |
OLD | NEW |