| OLD | NEW |
| 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 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ | 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ |
| 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ | 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Sets preview_enabled_ for the PageActionImageView associated with this | 104 // Sets preview_enabled_ for the PageActionImageView associated with this |
| 105 // |page_action|. If |preview_enabled|, the location bar will display the | 105 // |page_action|. If |preview_enabled|, the location bar will display the |
| 106 // PageAction icon even if it has not been activated by the extension. | 106 // PageAction icon even if it has not been activated by the extension. |
| 107 // This is used by the ExtensionInstalledBubble to preview what the icon | 107 // This is used by the ExtensionInstalledBubble to preview what the icon |
| 108 // will look like for the user upon installation of the extension. | 108 // will look like for the user upon installation of the extension. |
| 109 void SetPreviewEnabledPageAction(ExtensionAction* page_action, | 109 void SetPreviewEnabledPageAction(ExtensionAction* page_action, |
| 110 bool preview_enabled); | 110 bool preview_enabled); |
| 111 | 111 |
| 112 // Return |page_action|'s info-bubble point in window coordinates. | 112 // Return |page_action|'s info-bubble point in window coordinates. |
| 113 // Returns |NSZeroPoint| if |page_action| is not present. | 113 // This function should always be called with a visible page action. |
| 114 // If |page_action| is not a page action or not visible, NOTREACHED() |
| 115 // is called and this function returns |NSZeroPoint|. |
| 114 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); | 116 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); |
| 115 | 117 |
| 116 // Get the blocked-popup content setting's frame in window | 118 // Get the blocked-popup content setting's frame in window |
| 117 // coordinates. Used by the blocked-popup animation. Returns | 119 // coordinates. Used by the blocked-popup animation. Returns |
| 118 // |NSZeroRect| if the relevant content setting decoration is not | 120 // |NSZeroRect| if the relevant content setting decoration is not |
| 119 // visible. | 121 // visible. |
| 120 NSRect GetBlockedPopupRect() const; | 122 NSRect GetBlockedPopupRect() const; |
| 121 | 123 |
| 122 virtual void OnAutocompleteAccept(const GURL& url, | 124 virtual void OnAutocompleteAccept(const GURL& url, |
| 123 WindowOpenDisposition disposition, | 125 WindowOpenDisposition disposition, |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 // Used to register for notifications received by NotificationObserver. | 210 // Used to register for notifications received by NotificationObserver. |
| 209 NotificationRegistrar registrar_; | 211 NotificationRegistrar registrar_; |
| 210 | 212 |
| 211 // Used to schedule a task for the first run info bubble. | 213 // Used to schedule a task for the first run info bubble. |
| 212 ScopedRunnableMethodFactory<LocationBarViewMac> first_run_bubble_; | 214 ScopedRunnableMethodFactory<LocationBarViewMac> first_run_bubble_; |
| 213 | 215 |
| 214 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 216 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
| 215 }; | 217 }; |
| 216 | 218 |
| 217 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ | 219 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ |
| OLD | NEW |