| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // security style, and if |should_restore_state| is true, restores | 124 // security style, and if |should_restore_state| is true, restores |
| 125 // saved state from the tab (for tab switching). | 125 // saved state from the tab (for tab switching). |
| 126 void Update(const content::WebContents* tab, bool should_restore_state); | 126 void Update(const content::WebContents* tab, bool should_restore_state); |
| 127 | 127 |
| 128 // Layout the various decorations which live in the field. | 128 // Layout the various decorations which live in the field. |
| 129 void Layout(); | 129 void Layout(); |
| 130 | 130 |
| 131 // Re-draws |decoration| if it's already being displayed. | 131 // Re-draws |decoration| if it's already being displayed. |
| 132 void RedrawDecoration(LocationBarDecoration* decoration); | 132 void RedrawDecoration(LocationBarDecoration* decoration); |
| 133 | 133 |
| 134 // Returns the current WebContents. | |
| 135 content::WebContents* GetWebContents() const; | |
| 136 | |
| 137 // Sets preview_enabled_ for the PageActionImageView associated with this | 134 // Sets preview_enabled_ for the PageActionImageView associated with this |
| 138 // |page_action|. If |preview_enabled|, the location bar will display the | 135 // |page_action|. If |preview_enabled|, the location bar will display the |
| 139 // PageAction icon even if it has not been activated by the extension. | 136 // PageAction icon even if it has not been activated by the extension. |
| 140 // This is used by the ExtensionInstalledBubble to preview what the icon | 137 // This is used by the ExtensionInstalledBubble to preview what the icon |
| 141 // will look like for the user upon installation of the extension. | 138 // will look like for the user upon installation of the extension. |
| 142 void SetPreviewEnabledPageAction(ExtensionAction* page_action, | 139 void SetPreviewEnabledPageAction(ExtensionAction* page_action, |
| 143 bool preview_enabled); | 140 bool preview_enabled); |
| 144 | 141 |
| 145 // Retrieve the frame for the given |page_action|. | 142 // Retrieve the frame for the given |page_action|. |
| 146 NSRect GetPageActionFrame(ExtensionAction* page_action); | 143 NSRect GetPageActionFrame(ExtensionAction* page_action); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 164 content::PageTransition transition, | 161 content::PageTransition transition, |
| 165 const GURL& alternate_nav_url) OVERRIDE; | 162 const GURL& alternate_nav_url) OVERRIDE; |
| 166 virtual void OnChanged() OVERRIDE; | 163 virtual void OnChanged() OVERRIDE; |
| 167 virtual void OnSelectionBoundsChanged() OVERRIDE; | 164 virtual void OnSelectionBoundsChanged() OVERRIDE; |
| 168 virtual void OnInputInProgress(bool in_progress) OVERRIDE; | 165 virtual void OnInputInProgress(bool in_progress) OVERRIDE; |
| 169 virtual void OnKillFocus() OVERRIDE; | 166 virtual void OnKillFocus() OVERRIDE; |
| 170 virtual void OnSetFocus() OVERRIDE; | 167 virtual void OnSetFocus() OVERRIDE; |
| 171 virtual gfx::Image GetFavicon() const OVERRIDE; | 168 virtual gfx::Image GetFavicon() const OVERRIDE; |
| 172 virtual string16 GetTitle() const OVERRIDE; | 169 virtual string16 GetTitle() const OVERRIDE; |
| 173 virtual InstantController* GetInstant() OVERRIDE; | 170 virtual InstantController* GetInstant() OVERRIDE; |
| 174 virtual TabContents* GetTabContents() const OVERRIDE; | 171 virtual content::WebContents* GetWebContents() const OVERRIDE; |
| 175 | 172 |
| 176 NSImage* GetKeywordImage(const string16& keyword); | 173 NSImage* GetKeywordImage(const string16& keyword); |
| 177 | 174 |
| 178 AutocompleteTextField* GetAutocompleteTextField() { return field_; } | 175 AutocompleteTextField* GetAutocompleteTextField() { return field_; } |
| 179 | 176 |
| 180 | 177 |
| 181 // content::NotificationObserver: | 178 // content::NotificationObserver: |
| 182 virtual void Observe(int type, | 179 virtual void Observe(int type, |
| 183 const content::NotificationSource& source, | 180 const content::NotificationSource& source, |
| 184 const content::NotificationDetails& details) OVERRIDE; | 181 const content::NotificationDetails& details) OVERRIDE; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 // Used to schedule a task for the first run info bubble. | 287 // Used to schedule a task for the first run info bubble. |
| 291 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 288 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
| 292 | 289 |
| 293 // Used to change the visibility of the star decoration. | 290 // Used to change the visibility of the star decoration. |
| 294 BooleanPrefMember edit_bookmarks_enabled_; | 291 BooleanPrefMember edit_bookmarks_enabled_; |
| 295 | 292 |
| 296 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 293 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
| 297 }; | 294 }; |
| 298 | 295 |
| 299 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 296 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
| OLD | NEW |