Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 422233009: Add ManagePasswordsBubbleController and unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 return locationBarView_->GetBookmarkBubblePoint(); 727 return locationBarView_->GetBookmarkBubblePoint();
728 728
729 // Grab bottom middle of hotdogs. 729 // Grab bottom middle of hotdogs.
730 NSRect frame = wrenchButton_.frame; 730 NSRect frame = wrenchButton_.frame;
731 NSPoint point = NSMakePoint(NSMidX(frame), NSMinY(frame)); 731 NSPoint point = NSMakePoint(NSMidX(frame), NSMinY(frame));
732 // Inset to account for the whitespace around the hotdogs. 732 // Inset to account for the whitespace around the hotdogs.
733 point.y += wrench_menu_controller::kWrenchBubblePointOffsetY; 733 point.y += wrench_menu_controller::kWrenchBubblePointOffsetY;
734 return [self.view convertPoint:point toView:nil]; 734 return [self.view convertPoint:point toView:nil];
735 } 735 }
736 736
737 - (NSPoint)managePasswordsBubblePoint {
738 return locationBarView_->GetManagePasswordsBubblePoint();
739 }
740
737 - (NSPoint)translateBubblePoint { 741 - (NSPoint)translateBubblePoint {
738 return locationBarView_->GetTranslateBubblePoint(); 742 return locationBarView_->GetTranslateBubblePoint();
739 } 743 }
740 744
741 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight { 745 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight {
742 // With no toolbar, just ignore the compression. 746 // With no toolbar, just ignore the compression.
743 if (!hasToolbar_) 747 if (!hasToolbar_)
744 return NSHeight([locationBar_ frame]); 748 return NSHeight([locationBar_ frame]);
745 749
746 return kBaseToolbarHeightNormal - compressByHeight; 750 return kBaseToolbarHeightNormal - compressByHeight;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 - (void)hideDropURLsIndicatorInView:(NSView*)view { 835 - (void)hideDropURLsIndicatorInView:(NSView*)view {
832 // Do nothing. 836 // Do nothing.
833 } 837 }
834 838
835 // (URLDropTargetController protocol) 839 // (URLDropTargetController protocol)
836 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 840 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
837 return drag_util::IsUnsupportedDropData(profile_, info); 841 return drag_util::IsUnsupportedDropData(profile_, info);
838 } 842 }
839 843
840 @end 844 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698