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

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

Issue 3034003: Land new resource for content-setting images. (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
« no previous file with comments | « chrome/app/theme/blocked_popups.png ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // decorations need to be trimmed. 45 // decorations need to be trimmed.
46 const CGFloat kEditorHorizontalInset = 3.0; 46 const CGFloat kEditorHorizontalInset = 3.0;
47 47
48 // How far to inset the left-hand decorations from the field's bounds. 48 // How far to inset the left-hand decorations from the field's bounds.
49 const CGFloat kLeftDecorationXOffset = 3.0; 49 const CGFloat kLeftDecorationXOffset = 3.0;
50 50
51 // How far to inset the right-hand decorations from the field's bounds. 51 // How far to inset the right-hand decorations from the field's bounds.
52 // TODO(shess): Why is this different from |kLeftDecorationXOffset|? 52 // TODO(shess): Why is this different from |kLeftDecorationXOffset|?
53 const CGFloat kRightDecorationXOffset = 4.0; 53 const CGFloat kRightDecorationXOffset = 4.0;
54 54
55 // The amount of padding on either side reserved for drawing decorations. 55 // The amount of padding on either side reserved for drawing
56 const CGFloat kDecorationHorizontalPad = 3; 56 // decorations. [Views has |kItemPadding| == 3.]
57 const CGFloat kDecorationHorizontalPad = 3.0;
57 58
58 // How long to wait for mouse-up on the location icon before assuming 59 // How long to wait for mouse-up on the location icon before assuming
59 // that the user wants to drag. 60 // that the user wants to drag.
60 const NSTimeInterval kLocationIconDragTimeout = 0.25; 61 const NSTimeInterval kLocationIconDragTimeout = 0.25;
61 62
62 // Conveniences to centralize width+offset calculations. 63 // Conveniences to centralize width+offset calculations.
63 CGFloat WidthForHint(NSAttributedString* hintString) { 64 CGFloat WidthForHint(NSAttributedString* hintString) {
64 return kRightDecorationXOffset + ceil([hintString size].width); 65 return kRightDecorationXOffset + ceil([hintString size].width);
65 } 66 }
66 67
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 720 }
720 721
721 return YES; 722 return YES;
722 } 723 }
723 724
724 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal { 725 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal {
725 return NSDragOperationCopy; 726 return NSDragOperationCopy;
726 } 727 }
727 728
728 @end 729 @end
OLDNEW
« no previous file with comments | « chrome/app/theme/blocked_popups.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698