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

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

Issue 2998004: [Mac] Simplify getting page-action info-bubble point. (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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/cocoa/styled_text_field_cell.h" 7 #import "chrome/browser/cocoa/styled_text_field_cell.h"
8 8
9 #include "base/scoped_nsobject.h" 9 #include "base/scoped_nsobject.h"
10 #include "chrome/browser/cocoa/location_bar/location_bar_view_mac.h" 10 #include "chrome/browser/cocoa/location_bar/location_bar_view_mac.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 - (NSRect)frameForDecoration:(const LocationBarDecoration*)aDecoration 116 - (NSRect)frameForDecoration:(const LocationBarDecoration*)aDecoration
117 inFrame:(NSRect)cellFrame; 117 inFrame:(NSRect)cellFrame;
118 118
119 // Returns the portion of the cell to use for displaying the Page 119 // Returns the portion of the cell to use for displaying the Page
120 // Action icon at the given index. May be NSZeroRect if the index's 120 // Action icon at the given index. May be NSZeroRect if the index's
121 // action is not visible. This does a linear walk over all page 121 // action is not visible. This does a linear walk over all page
122 // actions, so do not call this in a loop to get the position of all 122 // actions, so do not call this in a loop to get the position of all
123 // page actions. Use |-layedOutIcons:| instead in that case. 123 // page actions. Use |-layedOutIcons:| instead in that case.
124 - (NSRect)pageActionFrameForIndex:(size_t)index inFrame:(NSRect)cellFrame; 124 - (NSRect)pageActionFrameForIndex:(size_t)index inFrame:(NSRect)cellFrame;
125 125
126 // Similar to |pageActionFrameForIndex:inFrame| but accepts an
127 // ExtensionAction for when the index is not known.
128 - (NSRect)pageActionFrameForExtensionAction:(ExtensionAction*)action
129 inFrame:(NSRect)cellFrame;
130
131 // Find the icon under the event. |nil| if |theEvent| is not over 126 // Find the icon under the event. |nil| if |theEvent| is not over
132 // anything. 127 // anything.
133 - (AutocompleteTextFieldIcon*)iconForEvent:(NSEvent*)theEvent 128 - (AutocompleteTextFieldIcon*)iconForEvent:(NSEvent*)theEvent
134 inRect:(NSRect)cellFrame 129 inRect:(NSRect)cellFrame
135 ofView:(AutocompleteTextField*)controlView; 130 ofView:(AutocompleteTextField*)controlView;
136 131
137 // Return the appropriate menu for any page actions under event. 132 // Return the appropriate menu for any page actions under event.
138 // Returns nil if no menu is present for the action, or if the event 133 // Returns nil if no menu is present for the action, or if the event
139 // is not over an action. 134 // is not over an action.
140 - (NSMenu*)actionMenuForEvent:(NSEvent*)theEvent 135 - (NSMenu*)actionMenuForEvent:(NSEvent*)theEvent
(...skipping 11 matching lines...) Expand all
152 // Internal methods here exposed for unit testing. 147 // Internal methods here exposed for unit testing.
153 @interface AutocompleteTextFieldCell (UnitTesting) 148 @interface AutocompleteTextFieldCell (UnitTesting)
154 149
155 @property(nonatomic, readonly) NSAttributedString* hintString; 150 @property(nonatomic, readonly) NSAttributedString* hintString;
156 @property(nonatomic, readonly) NSAttributedString* hintIconLabel; 151 @property(nonatomic, readonly) NSAttributedString* hintIconLabel;
157 152
158 // Returns the total number of installed Page Actions, visible or not. 153 // Returns the total number of installed Page Actions, visible or not.
159 - (size_t)pageActionCount; 154 - (size_t)pageActionCount;
160 155
161 @end 156 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698