OLD | NEW |
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 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 content::WebContents* GetWebContents() const; | 119 content::WebContents* GetWebContents() const; |
120 | 120 |
121 // Sets preview_enabled_ for the PageActionImageView associated with this | 121 // Sets preview_enabled_ for the PageActionImageView associated with this |
122 // |page_action|. If |preview_enabled|, the location bar will display the | 122 // |page_action|. If |preview_enabled|, the location bar will display the |
123 // PageAction icon even if it has not been activated by the extension. | 123 // PageAction icon even if it has not been activated by the extension. |
124 // This is used by the ExtensionInstalledBubble to preview what the icon | 124 // This is used by the ExtensionInstalledBubble to preview what the icon |
125 // will look like for the user upon installation of the extension. | 125 // will look like for the user upon installation of the extension. |
126 void SetPreviewEnabledPageAction(ExtensionAction* page_action, | 126 void SetPreviewEnabledPageAction(ExtensionAction* page_action, |
127 bool preview_enabled); | 127 bool preview_enabled); |
128 | 128 |
| 129 // Retrieve the frame for the given |page_action|. |
| 130 NSRect GetPageActionFrame(ExtensionAction* page_action); |
| 131 |
129 // Return |page_action|'s info-bubble point in window coordinates. | 132 // Return |page_action|'s info-bubble point in window coordinates. |
130 // This function should always be called with a visible page action. | 133 // This function should always be called with a visible page action. |
131 // If |page_action| is not a page action or not visible, NOTREACHED() | 134 // If |page_action| is not a page action or not visible, NOTREACHED() |
132 // is called and this function returns |NSZeroPoint|. | 135 // is called and this function returns |NSZeroPoint|. |
133 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); | 136 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); |
134 | 137 |
135 // Get the blocked-popup content setting's frame in window | 138 // Get the blocked-popup content setting's frame in window |
136 // coordinates. Used by the blocked-popup animation. Returns | 139 // coordinates. Used by the blocked-popup animation. Returns |
137 // |NSZeroRect| if the relevant content setting decoration is not | 140 // |NSZeroRect| if the relevant content setting decoration is not |
138 // visible. | 141 // visible. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // Used to schedule a task for the first run info bubble. | 256 // Used to schedule a task for the first run info bubble. |
254 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 257 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
255 | 258 |
256 // Used to change the visibility of the star decoration. | 259 // Used to change the visibility of the star decoration. |
257 BooleanPrefMember edit_bookmarks_enabled_; | 260 BooleanPrefMember edit_bookmarks_enabled_; |
258 | 261 |
259 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 262 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
260 }; | 263 }; |
261 | 264 |
262 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 265 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
OLD | NEW |