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

Side by Side Diff: chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.mm

Issue 2868058: [Mac] Re-enable decoration tooltips in omnibox. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 5 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/cocoa/location_bar/autocomplete_text_field_cell.h" 5 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/cocoa/image_utils.h" 8 #import "chrome/browser/cocoa/image_utils.h"
9 #import "chrome/browser/cocoa/location_bar/location_bar_decoration.h" 9 #import "chrome/browser/cocoa/location_bar/location_bar_decoration.h"
10 10
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 return NO; 680 return NO;
681 } 681 }
682 682
683 return YES; 683 return YES;
684 } 684 }
685 685
686 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { 686 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal {
687 return NSDragOperationCopy; 687 return NSDragOperationCopy;
688 } 688 }
689 689
690 - (void)updateToolTipsInRect:(NSRect)cellFrame
691 ofView:(AutocompleteTextField*)controlView {
692 std::vector<LocationBarDecoration*> decorations;
693 std::vector<NSRect> decorationFrames;
694 NSRect textFrame;
695 CalculatePositionsInFrame(cellFrame, leftDecorations_, rightDecorations_,
696 &decorations, &decorationFrames, &textFrame);
697
698 for (size_t i = 0; i < decorations.size(); ++i) {
699 NSString* tooltip = decorations[i]->GetToolTip();
700 if ([tooltip length] > 0)
701 [controlView addToolTip:tooltip forRect:decorationFrames[i]];
702 }
703 }
704
690 @end 705 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698