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

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: Fix bad merge Created 5 years, 11 months 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action); 151 NSPoint GetPageActionBubblePoint(ExtensionAction* page_action);
154 152
155 // Clears any location bar state stored for |contents|. 153 // Clears any location bar state stored for |contents|.
156 void ResetTabState(content::WebContents* contents); 154 void ResetTabState(content::WebContents* contents);
157 155
158 // OmniboxEditController: 156 // OmniboxEditController:
159 void Update(const content::WebContents* contents) override; 157 void Update(const content::WebContents* contents) override;
160 void OnChanged() override; 158 void OnChanged() override;
161 void OnSetFocus() override; 159 void OnSetFocus() override;
162 void ShowURL() override; 160 void ShowURL() override;
163 void EndOriginChipAnimations(bool cancel_fade) override;
164 InstantController* GetInstant() override; 161 InstantController* GetInstant() override;
165 content::WebContents* GetWebContents() override; 162 content::WebContents* GetWebContents() override;
166 ToolbarModel* GetToolbarModel() override; 163 ToolbarModel* GetToolbarModel() override;
167 const ToolbarModel* GetToolbarModel() const override; 164 const ToolbarModel* GetToolbarModel() const override;
168 165
169 NSImage* GetKeywordImage(const base::string16& keyword); 166 NSImage* GetKeywordImage(const base::string16& keyword);
170 167
171 AutocompleteTextField* GetAutocompleteTextField() { return field_; } 168 AutocompleteTextField* GetAutocompleteTextField() { return field_; }
172 169
173 ManagePasswordsDecoration* manage_passwords_decoration() { 170 ManagePasswordsDecoration* manage_passwords_decoration() {
174 return manage_passwords_decoration_.get(); 171 return manage_passwords_decoration_.get();
175 } 172 }
176 173
177 // SearchModelObserver: 174 // SearchModelObserver:
178 void ModelChanged(const SearchModel::State& old_state, 175 void ModelChanged(const SearchModel::State& old_state,
179 const SearchModel::State& new_state) override; 176 const SearchModel::State& new_state) override;
180 177
181 Browser* browser() const { return browser_; } 178 Browser* browser() const { return browser_; }
182 179
183 protected:
184 // OmniboxEditController:
185 void HideURL() override;
186
187 private: 180 private:
188 friend ZoomDecorationTest; 181 friend ZoomDecorationTest;
189 182
190 // Posts |notification| to the default notification center. 183 // Posts |notification| to the default notification center.
191 void PostNotification(NSString* notification); 184 void PostNotification(NSString* notification);
192 185
193 // Return the decoration for |page_action|. 186 // Return the decoration for |page_action|.
194 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action); 187 PageActionDecoration* GetPageActionDecoration(ExtensionAction* page_action);
195 188
196 // Clear the page-action decorations. 189 // Clear the page-action decorations.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 250
258 // Keyword hint decoration displayed on the right-hand side. 251 // Keyword hint decoration displayed on the right-hand side.
259 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_; 252 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_;
260 253
261 // The voice search icon. 254 // The voice search icon.
262 scoped_ptr<MicSearchDecoration> mic_search_decoration_; 255 scoped_ptr<MicSearchDecoration> mic_search_decoration_;
263 256
264 // Generated CC hint decoration. 257 // Generated CC hint decoration.
265 scoped_ptr<GeneratedCreditCardDecoration> generated_credit_card_decoration_; 258 scoped_ptr<GeneratedCreditCardDecoration> generated_credit_card_decoration_;
266 259
267 // The right-hand-side search button that is shown on search result pages.
268 scoped_ptr<SearchButtonDecoration> search_button_decoration_;
269
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. 260 // The right-hand-side button to manage passwords associated with a page.
274 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_; 261 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_;
275 262
276 Browser* browser_; 263 Browser* browser_;
277 264
278 // Used to schedule a task for the first run info bubble. 265 // Used to schedule a task for the first run info bubble.
279 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; 266 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
280 267
281 // Used to change the visibility of the star decoration. 268 // Used to change the visibility of the star decoration.
282 BooleanPrefMember edit_bookmarks_enabled_; 269 BooleanPrefMember edit_bookmarks_enabled_;
283 270
284 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 271 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
285 }; 272 };
286 273
287 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 274 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698