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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 22 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
23 #include "chrome/browser/ui/toolbar/toolbar_model.h" | 23 #include "chrome/browser/ui/toolbar/toolbar_model.h" |
24 #include "chrome/common/content_settings_types.h" | 24 #include "chrome/common/content_settings_types.h" |
25 | 25 |
26 @class AutocompleteTextField; | 26 @class AutocompleteTextField; |
27 class ChromeToMobileDecoration; | 27 class ChromeToMobileDecoration; |
28 class CommandUpdater; | 28 class CommandUpdater; |
29 class ContentSettingDecoration; | 29 class ContentSettingDecoration; |
30 class EVBubbleDecoration; | 30 class EVBubbleDecoration; |
31 class KeywordHintDecoration; | 31 class KeywordHintDecoration; |
| 32 class LocationBarDecoration; |
32 class LocationIconDecoration; | 33 class LocationIconDecoration; |
33 class PageActionDecoration; | 34 class PageActionDecoration; |
34 class Profile; | 35 class Profile; |
35 class SelectedKeywordDecoration; | 36 class SelectedKeywordDecoration; |
36 class SkBitmap; | 37 class SkBitmap; |
37 class StarDecoration; | 38 class StarDecoration; |
38 class ToolbarModel; | 39 class ToolbarModel; |
39 | 40 |
40 // A C++ bridge class that represents the location bar UI element to | 41 // A C++ bridge class that represents the location bar UI element to |
41 // the portable code. Wires up an OmniboxViewMac instance to | 42 // the portable code. Wires up an OmniboxViewMac instance to |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 NSPoint GetPageInfoBubblePoint() const; | 104 NSPoint GetPageInfoBubblePoint() const; |
104 | 105 |
105 // Updates the location bar. Resets the bar's permanent text and | 106 // Updates the location bar. Resets the bar's permanent text and |
106 // security style, and if |should_restore_state| is true, restores | 107 // security style, and if |should_restore_state| is true, restores |
107 // saved state from the tab (for tab switching). | 108 // saved state from the tab (for tab switching). |
108 void Update(const content::WebContents* tab, bool should_restore_state); | 109 void Update(const content::WebContents* tab, bool should_restore_state); |
109 | 110 |
110 // Layout the various decorations which live in the field. | 111 // Layout the various decorations which live in the field. |
111 void Layout(); | 112 void Layout(); |
112 | 113 |
| 114 // Re-draws |decoration| if it's already being displayed. |
| 115 void RedrawDecoration(LocationBarDecoration* decoration); |
| 116 |
113 // Returns the current WebContents. | 117 // Returns the current WebContents. |
114 content::WebContents* GetWebContents() const; | 118 content::WebContents* GetWebContents() const; |
115 | 119 |
116 // Sets preview_enabled_ for the PageActionImageView associated with this | 120 // Sets preview_enabled_ for the PageActionImageView associated with this |
117 // |page_action|. If |preview_enabled|, the location bar will display the | 121 // |page_action|. If |preview_enabled|, the location bar will display the |
118 // PageAction icon even if it has not been activated by the extension. | 122 // PageAction icon even if it has not been activated by the extension. |
119 // This is used by the ExtensionInstalledBubble to preview what the icon | 123 // This is used by the ExtensionInstalledBubble to preview what the icon |
120 // will look like for the user upon installation of the extension. | 124 // will look like for the user upon installation of the extension. |
121 void SetPreviewEnabledPageAction(ExtensionAction* page_action, | 125 void SetPreviewEnabledPageAction(ExtensionAction* page_action, |
122 bool preview_enabled); | 126 bool preview_enabled); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // Used to schedule a task for the first run info bubble. | 249 // Used to schedule a task for the first run info bubble. |
246 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 250 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
247 | 251 |
248 // Used to change the visibility of the star decoration. | 252 // Used to change the visibility of the star decoration. |
249 BooleanPrefMember edit_bookmarks_enabled_; | 253 BooleanPrefMember edit_bookmarks_enabled_; |
250 | 254 |
251 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 255 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
252 }; | 256 }; |
253 | 257 |
254 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 258 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
OLD | NEW |