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

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

Issue 419263002: Add ManagePasswordsDecoration and unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 return locationBarView_->GetBookmarkBubblePoint(); 728 return locationBarView_->GetBookmarkBubblePoint();
729 729
730 // Grab bottom middle of hotdogs. 730 // Grab bottom middle of hotdogs.
731 NSRect frame = wrenchButton_.frame; 731 NSRect frame = wrenchButton_.frame;
732 NSPoint point = NSMakePoint(NSMidX(frame), NSMinY(frame)); 732 NSPoint point = NSMakePoint(NSMidX(frame), NSMinY(frame));
733 // Inset to account for the whitespace around the hotdogs. 733 // Inset to account for the whitespace around the hotdogs.
734 point.y += wrench_menu_controller::kWrenchBubblePointOffsetY; 734 point.y += wrench_menu_controller::kWrenchBubblePointOffsetY;
735 return [self.view convertPoint:point toView:nil]; 735 return [self.view convertPoint:point toView:nil];
736 } 736 }
737 737
738 - (NSPoint)managePasswordsBubblePoint {
rohitrao (ping after 24h) 2014/07/31 12:35:20 Is this called by anyone?
dconnelly 2014/08/01 09:11:46 Not currently. Moved to a follow-up CL.
739 return locationBarView_->GetManagePasswordsBubblePoint();
740 }
741
738 - (NSPoint)translateBubblePoint { 742 - (NSPoint)translateBubblePoint {
739 return locationBarView_->GetTranslateBubblePoint(); 743 return locationBarView_->GetTranslateBubblePoint();
740 } 744 }
741 745
742 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight { 746 - (CGFloat)desiredHeightForCompression:(CGFloat)compressByHeight {
743 // With no toolbar, just ignore the compression. 747 // With no toolbar, just ignore the compression.
744 if (!hasToolbar_) 748 if (!hasToolbar_)
745 return NSHeight([locationBar_ frame]); 749 return NSHeight([locationBar_ frame]);
746 750
747 return kBaseToolbarHeightNormal - compressByHeight; 751 return kBaseToolbarHeightNormal - compressByHeight;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 - (void)hideDropURLsIndicatorInView:(NSView*)view { 836 - (void)hideDropURLsIndicatorInView:(NSView*)view {
833 // Do nothing. 837 // Do nothing.
834 } 838 }
835 839
836 // (URLDropTargetController protocol) 840 // (URLDropTargetController protocol)
837 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 841 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
838 return drag_util::IsUnsupportedDropData(profile_, info); 842 return drag_util::IsUnsupportedDropData(profile_, info);
839 } 843 }
840 844
841 @end 845 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698