| 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 12 matching lines...) Expand all Loading... |
| 23 @class AutocompleteTextField; | 23 @class AutocompleteTextField; |
| 24 class CommandUpdater; | 24 class CommandUpdater; |
| 25 class ContentSettingDecoration; | 25 class ContentSettingDecoration; |
| 26 class EVBubbleDecoration; | 26 class EVBubbleDecoration; |
| 27 class GeneratedCreditCardDecoration; | 27 class GeneratedCreditCardDecoration; |
| 28 class KeywordHintDecoration; | 28 class KeywordHintDecoration; |
| 29 class LocationBarDecoration; | 29 class LocationBarDecoration; |
| 30 class LocationIconDecoration; | 30 class LocationIconDecoration; |
| 31 class ManagePasswordsDecoration; | 31 class ManagePasswordsDecoration; |
| 32 class MicSearchDecoration; | 32 class MicSearchDecoration; |
| 33 class OriginChipDecoration; | |
| 34 class PageActionDecoration; | 33 class PageActionDecoration; |
| 35 class Profile; | 34 class Profile; |
| 36 class SearchButtonDecoration; | 35 class SearchButtonDecoration; |
| 37 class SelectedKeywordDecoration; | 36 class SelectedKeywordDecoration; |
| 38 class StarDecoration; | 37 class StarDecoration; |
| 39 class TranslateDecoration; | 38 class TranslateDecoration; |
| 40 class ZoomDecoration; | 39 class ZoomDecoration; |
| 41 class ZoomDecorationTest; | 40 class ZoomDecorationTest; |
| 42 | 41 |
| 43 // A C++ bridge class that represents the location bar UI element to | 42 // A C++ bridge class that represents the location bar UI element to |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); | 152 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); |
| 154 | 153 |
| 155 // Clears any location bar state stored for |contents|. | 154 // Clears any location bar state stored for |contents|. |
| 156 void ResetTabState(content::WebContents* contents); | 155 void ResetTabState(content::WebContents* contents); |
| 157 | 156 |
| 158 // OmniboxEditController: | 157 // OmniboxEditController: |
| 159 void Update(const content::WebContents* contents) override; | 158 void Update(const content::WebContents* contents) override; |
| 160 void OnChanged() override; | 159 void OnChanged() override; |
| 161 void OnSetFocus() override; | 160 void OnSetFocus() override; |
| 162 void ShowURL() override; | 161 void ShowURL() override; |
| 163 void EndOriginChipAnimations(bool cancel_fade) override; | |
| 164 InstantController* GetInstant() override; | 162 InstantController* GetInstant() override; |
| 165 content::WebContents* GetWebContents() override; | 163 content::WebContents* GetWebContents() override; |
| 166 ToolbarModel* GetToolbarModel() override; | 164 ToolbarModel* GetToolbarModel() override; |
| 167 const ToolbarModel* GetToolbarModel() const override; | 165 const ToolbarModel* GetToolbarModel() const override; |
| 168 | 166 |
| 169 NSImage* GetKeywordImage(const base::string16& keyword); | 167 NSImage* GetKeywordImage(const base::string16& keyword); |
| 170 | 168 |
| 171 AutocompleteTextField* GetAutocompleteTextField() { return field_; } | 169 AutocompleteTextField* GetAutocompleteTextField() { return field_; } |
| 172 | 170 |
| 173 ManagePasswordsDecoration* manage_passwords_decoration() { | 171 ManagePasswordsDecoration* manage_passwords_decoration() { |
| 174 return manage_passwords_decoration_.get(); | 172 return manage_passwords_decoration_.get(); |
| 175 } | 173 } |
| 176 | 174 |
| 177 // SearchModelObserver: | 175 // SearchModelObserver: |
| 178 void ModelChanged(const SearchModel::State& old_state, | 176 void ModelChanged(const SearchModel::State& old_state, |
| 179 const SearchModel::State& new_state) override; | 177 const SearchModel::State& new_state) override; |
| 180 | 178 |
| 181 Browser* browser() const { return browser_; } | 179 Browser* browser() const { return browser_; } |
| 182 | 180 |
| 183 protected: | |
| 184 // OmniboxEditController: | |
| 185 void HideURL() override; | |
| 186 | |
| 187 private: | 181 private: |
| 188 friend ZoomDecorationTest; | 182 friend ZoomDecorationTest; |
| 189 | 183 |
| 190 // Posts |notification| to the default notification center. | 184 // Posts |notification| to the default notification center. |
| 191 void PostNotification(NSString* notification); | 185 void PostNotification(NSString* notification); |
| 192 | 186 |
| 193 // Return the decoration for |page_action|. | 187 // Return the decoration for |page_action|. |
| 194 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); | 188 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); |
| 195 | 189 |
| 196 // Clear the page-action decorations. | 190 // Clear the page-action decorations. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 | 254 |
| 261 // The voice search icon. | 255 // The voice search icon. |
| 262 scoped_ptr<MicSearchDecoration> mic_search_decoration_; | 256 scoped_ptr<MicSearchDecoration> mic_search_decoration_; |
| 263 | 257 |
| 264 // Generated CC hint decoration. | 258 // Generated CC hint decoration. |
| 265 scoped_ptr<GeneratedCreditCardDecoration> generated_credit_card_decoration_; | 259 scoped_ptr<GeneratedCreditCardDecoration> generated_credit_card_decoration_; |
| 266 | 260 |
| 267 // The right-hand-side search button that is shown on search result pages. | 261 // The right-hand-side search button that is shown on search result pages. |
| 268 scoped_ptr<SearchButtonDecoration> search_button_decoration_; | 262 scoped_ptr<SearchButtonDecoration> search_button_decoration_; |
| 269 | 263 |
| 270 // The left-hand-side origin chip. | |
| 271 scoped_ptr<OriginChipDecoration> origin_chip_decoration_; | |
| 272 | |
| 273 // The right-hand-side button to manage passwords associated with a page. | 264 // The right-hand-side button to manage passwords associated with a page. |
| 274 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_; | 265 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_; |
| 275 | 266 |
| 276 Browser* browser_; | 267 Browser* browser_; |
| 277 | 268 |
| 278 // Used to schedule a task for the first run info bubble. | 269 // Used to schedule a task for the first run info bubble. |
| 279 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 270 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
| 280 | 271 |
| 281 // Used to change the visibility of the star decoration. | 272 // Used to change the visibility of the star decoration. |
| 282 BooleanPrefMember edit_bookmarks_enabled_; | 273 BooleanPrefMember edit_bookmarks_enabled_; |
| 283 | 274 |
| 284 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 275 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
| 285 }; | 276 }; |
| 286 | 277 |
| 287 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 278 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
| OLD | NEW |