Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Side by Side Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h

Issue 768413003: TEST ONLY - DO NOT SUBMIT - FOR TRYBOTS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
37 class SelectedKeywordDecoration; 35 class SelectedKeywordDecoration;
38 class StarDecoration; 36 class StarDecoration;
39 class TranslateDecoration; 37 class TranslateDecoration;
40 class ZoomDecoration; 38 class ZoomDecoration;
41 class ZoomDecorationTest; 39 class ZoomDecorationTest;
42 40
43 // 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
44 // the portable code. Wires up an OmniboxViewMac instance to 42 // the portable code. Wires up an OmniboxViewMac instance to
45 // the location bar text field, which handles most of the work. 43 // the location bar text field, which handles most of the work.
46 44
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); 152 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action);
155 153
156 // Clears any location bar state stored for |contents|. 154 // Clears any location bar state stored for |contents|.
157 void ResetTabState(content::WebContents* contents); 155 void ResetTabState(content::WebContents* contents);
158 156
159 // OmniboxEditController: 157 // OmniboxEditController:
160 void Update(const content::WebContents* contents) override; 158 void Update(const content::WebContents* contents) override;
161 void OnChanged() override; 159 void OnChanged() override;
162 void OnSetFocus() override; 160 void OnSetFocus() override;
163 void ShowURL() override; 161 void ShowURL() override;
164 void EndOriginChipAnimations(bool cancel_fade) override;
165 InstantController* GetInstant() override; 162 InstantController* GetInstant() override;
166 content::WebContents* GetWebContents() override; 163 content::WebContents* GetWebContents() override;
167 ToolbarModel* GetToolbarModel() override; 164 ToolbarModel* GetToolbarModel() override;
168 const ToolbarModel* GetToolbarModel() const override; 165 const ToolbarModel* GetToolbarModel() const override;
169 166
170 NSImage* GetKeywordImage(const base::string16& keyword); 167 NSImage* GetKeywordImage(const base::string16& keyword);
171 168
172 AutocompleteTextField* GetAutocompleteTextField() { return field_; } 169 AutocompleteTextField* GetAutocompleteTextField() { return field_; }
173 170
174 ManagePasswordsDecoration* manage_passwords_decoration() { 171 ManagePasswordsDecoration* manage_passwords_decoration() {
175 return manage_passwords_decoration_.get(); 172 return manage_passwords_decoration_.get();
176 } 173 }
177 174
178 // SearchModelObserver: 175 // SearchModelObserver:
179 void ModelChanged(const SearchModel::State& old_state, 176 void ModelChanged(const SearchModel::State& old_state,
180 const SearchModel::State& new_state) override; 177 const SearchModel::State& new_state) override;
181 178
182 Browser* browser() const { return browser_; } 179 Browser* browser() const { return browser_; }
183 180
184 protected:
185 // OmniboxEditController:
186 void HideURL() override;
187
188 private: 181 private:
189 friend ZoomDecorationTest; 182 friend ZoomDecorationTest;
190 183
191 // Posts |notification| to the default notification center. 184 // Posts |notification| to the default notification center.
192 void PostNotification(NSString* notification); 185 void PostNotification(NSString* notification);
193 186
194 // Return the decoration for |page_action|. 187 // Return the decoration for |page_action|.
195 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); 188 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action);
196 189
197 // Clear the page-action decorations. 190 // Clear the page-action decorations.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 249
257 // Keyword hint decoration displayed on the right-hand side. 250 // Keyword hint decoration displayed on the right-hand side.
258 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_; 251 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_;
259 252
260 // The voice search icon. 253 // The voice search icon.
261 scoped_ptr<MicSearchDecoration> mic_search_decoration_; 254 scoped_ptr<MicSearchDecoration> mic_search_decoration_;
262 255
263 // Generated CC hint decoration. 256 // Generated CC hint decoration.
264 scoped_ptr<GeneratedCreditCardDecoration> generated_credit_card_decoration_; 257 scoped_ptr<GeneratedCreditCardDecoration> generated_credit_card_decoration_;
265 258
266 // The right-hand-side search button that is shown on search result pages.
267 scoped_ptr<SearchButtonDecoration> search_button_decoration_;
268
269 // The left-hand-side origin chip.
270 scoped_ptr<OriginChipDecoration> origin_chip_decoration_;
271
272 // The right-hand-side button to manage passwords associated with a page. 259 // The right-hand-side button to manage passwords associated with a page.
273 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_; 260 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_;
274 261
275 Browser* browser_; 262 Browser* browser_;
276 263
277 // Used to schedule a task for the first run info bubble. 264 // Used to schedule a task for the first run info bubble.
278 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; 265 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
279 266
280 // Used to change the visibility of the star decoration. 267 // Used to change the visibility of the star decoration.
281 BooleanPrefMember edit_bookmarks_enabled_; 268 BooleanPrefMember edit_bookmarks_enabled_;
282 269
283 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 270 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
284 }; 271 };
285 272
286 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 273 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698