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

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

Issue 2854051: [Mac] Convert omnibox keyword hint to decoration. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Created 10 years, 5 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_COCOA_LOCATION_BAR_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 6 #define CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/toolbar_model.h" 22 #include "chrome/browser/toolbar_model.h"
23 #include "chrome/common/content_settings_types.h" 23 #include "chrome/common/content_settings_types.h"
24 #include "third_party/skia/include/core/SkBitmap.h" 24 #include "third_party/skia/include/core/SkBitmap.h"
25 25
26 @class AutocompleteTextField; 26 @class AutocompleteTextField;
27 class CommandUpdater; 27 class CommandUpdater;
28 class ContentSettingDecoration; 28 class ContentSettingDecoration;
29 class ContentSettingImageModel; 29 class ContentSettingImageModel;
30 class EVBubbleDecoration; 30 class EVBubbleDecoration;
31 @class ExtensionPopupController; 31 @class ExtensionPopupController;
32 class KeywordHintDecoration;
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 StarDecoration; 37 class StarDecoration;
37 class ToolbarModel; 38 class ToolbarModel;
38 39
39 // A C++ bridge class that represents the location bar UI element to 40 // A C++ bridge class that represents the location bar UI element to
40 // the portable code. Wires up an AutocompleteEditViewMac instance to 41 // the portable code. Wires up an AutocompleteEditViewMac instance to
41 // the location bar text field, which handles most of the work. 42 // the location bar text field, which handles most of the work.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 WindowOpenDisposition disposition, 120 WindowOpenDisposition disposition,
120 PageTransition::Type transition, 121 PageTransition::Type transition,
121 const GURL& alternate_nav_url); 122 const GURL& alternate_nav_url);
122 virtual void OnChanged(); 123 virtual void OnChanged();
123 virtual void OnInputInProgress(bool in_progress); 124 virtual void OnInputInProgress(bool in_progress);
124 virtual void OnKillFocus(); 125 virtual void OnKillFocus();
125 virtual void OnSetFocus(); 126 virtual void OnSetFocus();
126 virtual SkBitmap GetFavIcon() const; 127 virtual SkBitmap GetFavIcon() const;
127 virtual std::wstring GetTitle() const; 128 virtual std::wstring GetTitle() const;
128 129
129 NSImage* GetTabButtonImage();
130 NSImage* GetKeywordImage(const std::wstring& keyword); 130 NSImage* GetKeywordImage(const std::wstring& keyword);
131
131 AutocompleteTextField* GetAutocompleteTextField() { return field_; } 132 AutocompleteTextField* GetAutocompleteTextField() { return field_; }
132 133
133 134
134 // Overridden from NotificationObserver. 135 // Overridden from NotificationObserver.
135 virtual void Observe(NotificationType type, 136 virtual void Observe(NotificationType type,
136 const NotificationSource& source, 137 const NotificationSource& source,
137 const NotificationDetails& details); 138 const NotificationDetails& details);
138 139
139 private: 140 private:
140 // Posts |notification| to the default notification center. 141 // Posts |notification| to the default notification center.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 183
183 // Bookmark star right of page actions. 184 // Bookmark star right of page actions.
184 scoped_ptr<StarDecoration> star_decoration_; 185 scoped_ptr<StarDecoration> star_decoration_;
185 186
186 // Any installed Page Actions. 187 // Any installed Page Actions.
187 ScopedVector<PageActionDecoration> page_action_decorations_; 188 ScopedVector<PageActionDecoration> page_action_decorations_;
188 189
189 // The content blocked decorations. 190 // The content blocked decorations.
190 ScopedVector<ContentSettingDecoration> content_setting_decorations_; 191 ScopedVector<ContentSettingDecoration> content_setting_decorations_;
191 192
193 // Keyword hint decoration displayed on the right-hand side.
194 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_;
195
192 Profile* profile_; 196 Profile* profile_;
193 197
194 Browser* browser_; 198 Browser* browser_;
195 199
196 ToolbarModel* toolbar_model_; // Weak, owned by Browser. 200 ToolbarModel* toolbar_model_; // Weak, owned by Browser.
197 201
198 // Image used in drawing keyword hint.
199 scoped_nsobject<NSImage> tab_button_image_;
200
201 // The transition type to use for the navigation. 202 // The transition type to use for the navigation.
202 PageTransition::Type transition_; 203 PageTransition::Type transition_;
203 204
204 // Used to register for notifications received by NotificationObserver. 205 // Used to register for notifications received by NotificationObserver.
205 NotificationRegistrar registrar_; 206 NotificationRegistrar registrar_;
206 207
207 // Used to schedule a task for the first run info bubble. 208 // Used to schedule a task for the first run info bubble.
208 ScopedRunnableMethodFactory<LocationBarViewMac> first_run_bubble_; 209 ScopedRunnableMethodFactory<LocationBarViewMac> first_run_bubble_;
209 210
210 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 211 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
211 }; 212 };
212 213
213 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_ 214 #endif // CHROME_BROWSER_COCOA_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698