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

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h

Issue 2324593002: [Mac] Fix for security indicator drag&drop navigation (Closed)
Patch Set: Fix for shrike Created 4 years, 3 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 #include <vector> 5 #include <vector>
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" 10 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 // The width available after accounting for decorations. 58 // The width available after accounting for decorations.
59 - (CGFloat)availableWidthInFrame:(const NSRect)frame; 59 - (CGFloat)availableWidthInFrame:(const NSRect)frame;
60 60
61 // Return the frame for |aDecoration| if the cell is in |cellFrame|. 61 // Return the frame for |aDecoration| if the cell is in |cellFrame|.
62 // Returns |NSZeroRect| for decorations which are not currently 62 // Returns |NSZeroRect| for decorations which are not currently
63 // visible. 63 // visible.
64 - (NSRect)frameForDecoration:(const LocationBarDecoration*)aDecoration 64 - (NSRect)frameForDecoration:(const LocationBarDecoration*)aDecoration
65 inFrame:(NSRect)cellFrame; 65 inFrame:(NSRect)cellFrame;
66 66
67 // Returns true if it's okay to drop dragged data into the view at the
68 // given location.
69 - (BOOL)canDropAtLocationInWindow:(NSPoint)location
70 ofView:(AutocompleteTextField*)controlView;
71
72 // Find the decoration under the location in the window. Return |NULL| if
73 // there's nothing in the location.
74 - (LocationBarDecoration*)decorationForLocationInWindow:(NSPoint)location
75 inRect:(NSRect)cellFrame
76 ofView:(AutocompleteTextField*)
77 field;
78
67 // Find the decoration under the event. |NULL| if |theEvent| is not 79 // Find the decoration under the event. |NULL| if |theEvent| is not
68 // over anything. 80 // over anything.
69 - (LocationBarDecoration*)decorationForEvent:(NSEvent*)theEvent 81 - (LocationBarDecoration*)decorationForEvent:(NSEvent*)theEvent
70 inRect:(NSRect)cellFrame 82 inRect:(NSRect)cellFrame
71 ofView:(AutocompleteTextField*)field; 83 ofView:(AutocompleteTextField*)field;
72 84
73 // Return the appropriate menu for any decorations under event. 85 // Return the appropriate menu for any decorations under event.
74 // Returns nil if no menu is present for the decoration, or if the 86 // Returns nil if no menu is present for the decoration, or if the
75 // event is not over a decoration. 87 // event is not over a decoration.
76 - (NSMenu*)decorationMenuForEvent:(NSEvent*)theEvent 88 - (NSMenu*)decorationMenuForEvent:(NSEvent*)theEvent
(...skipping 19 matching lines...) Expand all
96 // Gets and sets |hideFocusState|. This allows the text field to have focus but 108 // Gets and sets |hideFocusState|. This allows the text field to have focus but
97 // to appear unfocused. 109 // to appear unfocused.
98 - (BOOL)hideFocusState; 110 - (BOOL)hideFocusState;
99 - (void)setHideFocusState:(BOOL)hideFocusState 111 - (void)setHideFocusState:(BOOL)hideFocusState
100 ofView:(AutocompleteTextField*)controlView; 112 ofView:(AutocompleteTextField*)controlView;
101 113
102 // Handles the |event| that caused |controlView| to become firstResponder. 114 // Handles the |event| that caused |controlView| to become firstResponder.
103 - (void)handleFocusEvent:(NSEvent*)event 115 - (void)handleFocusEvent:(NSEvent*)event
104 ofView:(AutocompleteTextField*)controlView; 116 ofView:(AutocompleteTextField*)controlView;
105 @end 117 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698