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> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
15 #include "base/prefs/pref_member.h" | 15 #include "base/prefs/pref_member.h" |
16 #include "chrome/browser/ui/browser.h" | 16 #include "chrome/browser/ui/browser.h" |
17 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" | 17 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" |
18 #include "chrome/browser/ui/omnibox/location_bar.h" | 18 #include "chrome/browser/ui/omnibox/location_bar.h" |
19 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 19 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
20 #include "chrome/browser/ui/search/search_model_observer.h" | 20 #include "chrome/browser/ui/search/search_model_observer.h" |
21 #include "chrome/common/content_settings_types.h" | 21 #include "chrome/common/content_settings_types.h" |
22 | 22 |
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 KeywordHintDecoration; | 28 class KeywordHintDecoration; |
28 class LocationBarDecoration; | 29 class LocationBarDecoration; |
29 class LocationIconDecoration; | 30 class LocationIconDecoration; |
30 class MicSearchDecoration; | 31 class MicSearchDecoration; |
31 class PageActionDecoration; | 32 class PageActionDecoration; |
32 class Profile; | 33 class Profile; |
33 class SelectedKeywordDecoration; | 34 class SelectedKeywordDecoration; |
34 class StarDecoration; | 35 class StarDecoration; |
35 class ZoomDecoration; | 36 class ZoomDecoration; |
36 class ZoomDecorationTest; | 37 class ZoomDecorationTest; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 void PopUpContentSettingIfNeeded(); | 98 void PopUpContentSettingIfNeeded(); |
98 | 99 |
99 // Get the point in window coordinates on the star for the bookmark bubble to | 100 // Get the point in window coordinates on the star for the bookmark bubble to |
100 // aim at. | 101 // aim at. |
101 NSPoint GetBookmarkBubblePoint() const; | 102 NSPoint GetBookmarkBubblePoint() const; |
102 | 103 |
103 // Get the point in window coordinates in the security icon at which the page | 104 // Get the point in window coordinates in the security icon at which the page |
104 // info bubble aims. | 105 // info bubble aims. |
105 NSPoint GetPageInfoBubblePoint() const; | 106 NSPoint GetPageInfoBubblePoint() const; |
106 | 107 |
108 // Get the point in window coordinates in the "generated cc" icon at which the | |
109 // corresponding info bubble aims. | |
110 NSPoint GetGeneratedCreditCardBubblePoint() const; | |
111 | |
107 // When any image decorations change, call this to ensure everything is | 112 // When any image decorations change, call this to ensure everything is |
108 // redrawn and laid out if necessary. | 113 // redrawn and laid out if necessary. |
109 void OnDecorationsChanged(); | 114 void OnDecorationsChanged(); |
110 | 115 |
111 // Layout the various decorations which live in the field. | 116 // Layout the various decorations which live in the field. |
112 void Layout(); | 117 void Layout(); |
113 | 118 |
114 // Re-draws |decoration| if it's already being displayed. | 119 // Re-draws |decoration| if it's already being displayed. |
115 void RedrawDecoration(LocationBarDecoration* decoration); | 120 void RedrawDecoration(LocationBarDecoration* decoration); |
116 | 121 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
222 | 227 |
223 // The content blocked decorations. | 228 // The content blocked decorations. |
224 ScopedVector<ContentSettingDecoration> content_setting_decorations_; | 229 ScopedVector<ContentSettingDecoration> content_setting_decorations_; |
225 | 230 |
226 // Keyword hint decoration displayed on the right-hand side. | 231 // Keyword hint decoration displayed on the right-hand side. |
227 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_; | 232 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_; |
228 | 233 |
229 // The voice search icon. | 234 // The voice search icon. |
230 scoped_ptr<MicSearchDecoration> mic_search_decoration_; | 235 scoped_ptr<MicSearchDecoration> mic_search_decoration_; |
231 | 236 |
237 // Generated CC hint decoration. | |
238 scoped_ptr<GeneratedCreditCardDecoration> | |
239 generated_credit_card_decoration_; | |
Scott Hess - ex-Googler
2013/10/31 20:23:19
Sure this can't fit on one line? Looks like it wo
groby-ooo-7-16
2013/10/31 22:55:47
Just so - done.
| |
240 | |
232 Profile* profile_; | 241 Profile* profile_; |
233 | 242 |
234 Browser* browser_; | 243 Browser* browser_; |
235 | 244 |
236 // Used to register for notifications received by NotificationObserver. | 245 // Used to register for notifications received by NotificationObserver. |
237 content::NotificationRegistrar registrar_; | 246 content::NotificationRegistrar registrar_; |
238 | 247 |
239 // Used to schedule a task for the first run info bubble. | 248 // Used to schedule a task for the first run info bubble. |
240 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 249 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
241 | 250 |
242 // Used to change the visibility of the star decoration. | 251 // Used to change the visibility of the star decoration. |
243 BooleanPrefMember edit_bookmarks_enabled_; | 252 BooleanPrefMember edit_bookmarks_enabled_; |
244 | 253 |
245 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 254 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
246 }; | 255 }; |
247 | 256 |
248 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 257 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
OLD | NEW |