OLD | NEW |
---|---|
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/toolbar/toolbar_controller.h" | 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/mac/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
704 [NSAnimationContext beginGrouping]; | 704 [NSAnimationContext beginGrouping]; |
705 [[NSAnimationContext currentContext] setDuration:kAnimationDuration]; | 705 [[NSAnimationContext currentContext] setDuration:kAnimationDuration]; |
706 [[locationBar_ animator] setFrame:locationFrame]; | 706 [[locationBar_ animator] setFrame:locationFrame]; |
707 [NSAnimationContext endGrouping]; | 707 [NSAnimationContext endGrouping]; |
708 } | 708 } |
709 | 709 |
710 - (NSPoint)bookmarkBubblePoint { | 710 - (NSPoint)bookmarkBubblePoint { |
711 return locationBarView_->GetBookmarkBubblePoint(); | 711 return locationBarView_->GetBookmarkBubblePoint(); |
712 } | 712 } |
713 | 713 |
714 - (NSPoint)wrenchButtonBubblePoint { | |
Robert Sesek
2012/02/27 18:59:20
Remove? Not called and not declared in the .h
jstritar
2012/03/05 18:05:08
Done.
| |
715 const NSRect bounds = [wrenchButton_ bounds]; | |
716 NSPoint anchor = NSMakePoint(NSMidX(bounds), NSMidY(bounds)); | |
717 return [wrenchButton_ convertPoint:anchor toView:nil]; | |
718 } | |
719 | |
714 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight { | 720 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight { |
715 // With no toolbar, just ignore the compression. | 721 // With no toolbar, just ignore the compression. |
716 return hasToolbar_ ? kBaseToolbarHeight - compressByHeight : | 722 return hasToolbar_ ? kBaseToolbarHeight - compressByHeight : |
717 NSHeight([locationBar_ frame]); | 723 NSHeight([locationBar_ frame]); |
718 } | 724 } |
719 | 725 |
720 - (void)setDividerOpacity:(CGFloat)opacity { | 726 - (void)setDividerOpacity:(CGFloat)opacity { |
721 BackgroundGradientView* view = [self backgroundGradientView]; | 727 BackgroundGradientView* view = [self backgroundGradientView]; |
722 [view setShowsDivider:(opacity > 0 ? YES : NO)]; | 728 [view setShowsDivider:(opacity > 0 ? YES : NO)]; |
723 | 729 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
790 - (void)hideDropURLsIndicatorInView:(NSView*)view { | 796 - (void)hideDropURLsIndicatorInView:(NSView*)view { |
791 // Do nothing. | 797 // Do nothing. |
792 } | 798 } |
793 | 799 |
794 // (URLDropTargetController protocol) | 800 // (URLDropTargetController protocol) |
795 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { | 801 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { |
796 return drag_util::IsUnsupportedDropData(profile_, info); | 802 return drag_util::IsUnsupportedDropData(profile_, info); |
797 } | 803 } |
798 | 804 |
799 @end | 805 @end |
OLD | NEW |