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 "base/mac_util.h" | 5 #include "base/mac_util.h" |
6 #include "base/sys_string_conversions.h" | 6 #include "base/sys_string_conversions.h" |
7 #include "chrome/app/chrome_dll_resource.h" // IDC_* | 7 #include "chrome/app/chrome_dll_resource.h" // IDC_* |
8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
9 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" |
10 #include "chrome/browser/tab_contents/web_contents.h" | 10 #include "chrome/browser/tab_contents/web_contents.h" |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 } | 555 } |
556 | 556 |
557 - (NSRect)window:(NSWindow *)window | 557 - (NSRect)window:(NSWindow *)window |
558 willPositionSheet:(NSWindow *)sheet | 558 willPositionSheet:(NSWindow *)sheet |
559 usingRect:(NSRect)defaultSheetRect { | 559 usingRect:(NSRect)defaultSheetRect { |
560 NSRect windowFrame = [window frame]; | 560 NSRect windowFrame = [window frame]; |
561 defaultSheetRect.origin.y = windowFrame.size.height - 10; | 561 defaultSheetRect.origin.y = windowFrame.size.height - 10; |
562 return defaultSheetRect; | 562 return defaultSheetRect; |
563 } | 563 } |
564 | 564 |
| 565 // In addition to the tab strip and content area, which the superview's impl |
| 566 // takes care of, we need to add the toolbar and bookmark bar to the |
| 567 // overlay so they draw correctly when dragging out a new window. |
| 568 - (NSArray*)viewsToMoveToOverlay { |
| 569 NSArray* views = [super viewsToMoveToOverlay]; |
| 570 NSArray* browserViews = |
| 571 [NSArray arrayWithObjects:[toolbarController_ view], |
| 572 [bookmarkController_ view], |
| 573 nil]; |
| 574 return [views arrayByAddingObjectsFromArray:browserViews]; |
| 575 } |
| 576 |
565 @end | 577 @end |
OLD | NEW |