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> | |
9 | |
10 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
11 #include <stddef.h> | 9 #include <stddef.h> |
12 | 10 |
| 11 #include <memory> |
| 12 #include <string> |
| 13 |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/memory/scoped_ptr.h" | |
15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
18 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" | 18 #include "chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.h" |
19 #include "chrome/browser/ui/location_bar/location_bar.h" | 19 #include "chrome/browser/ui/location_bar/location_bar.h" |
20 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" | 20 #include "chrome/browser/ui/omnibox/chrome_omnibox_edit_controller.h" |
21 #include "components/content_settings/core/common/content_settings_types.h" | 21 #include "components/content_settings/core/common/content_settings_types.h" |
22 #include "components/prefs/pref_member.h" | 22 #include "components/prefs/pref_member.h" |
23 #include "components/ui/zoom/zoom_event_manager_observer.h" | 23 #include "components/ui/zoom/zoom_event_manager_observer.h" |
24 | 24 |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 void ShowFirstRunBubbleInternal(); | 229 void ShowFirstRunBubbleInternal(); |
230 | 230 |
231 // Updates the translate decoration in the omnibox with the current translate | 231 // Updates the translate decoration in the omnibox with the current translate |
232 // state. | 232 // state. |
233 void UpdateTranslateDecoration(); | 233 void UpdateTranslateDecoration(); |
234 | 234 |
235 // Updates the zoom decoration in the omnibox with the current zoom level. | 235 // Updates the zoom decoration in the omnibox with the current zoom level. |
236 // Returns whether any updates were made. | 236 // Returns whether any updates were made. |
237 bool UpdateZoomDecoration(bool default_zoom_changed); | 237 bool UpdateZoomDecoration(bool default_zoom_changed); |
238 | 238 |
239 scoped_ptr<OmniboxViewMac> omnibox_view_; | 239 std::unique_ptr<OmniboxViewMac> omnibox_view_; |
240 | 240 |
241 AutocompleteTextField* field_; // owned by tab controller | 241 AutocompleteTextField* field_; // owned by tab controller |
242 | 242 |
243 // A decoration that shows an icon to the left of the address. | 243 // A decoration that shows an icon to the left of the address. |
244 scoped_ptr<LocationIconDecoration> location_icon_decoration_; | 244 std::unique_ptr<LocationIconDecoration> location_icon_decoration_; |
245 | 245 |
246 // A decoration that shows the keyword-search bubble on the left. | 246 // A decoration that shows the keyword-search bubble on the left. |
247 scoped_ptr<SelectedKeywordDecoration> selected_keyword_decoration_; | 247 std::unique_ptr<SelectedKeywordDecoration> selected_keyword_decoration_; |
248 | 248 |
249 // A decoration that shows a lock icon and ev-cert label in a bubble | 249 // A decoration that shows a lock icon and ev-cert label in a bubble |
250 // on the left. | 250 // on the left. |
251 scoped_ptr<EVBubbleDecoration> ev_bubble_decoration_; | 251 std::unique_ptr<EVBubbleDecoration> ev_bubble_decoration_; |
252 | 252 |
253 // Save credit card icon on the right side of the omnibox. | 253 // Save credit card icon on the right side of the omnibox. |
254 scoped_ptr<SaveCreditCardDecoration> save_credit_card_decoration_; | 254 std::unique_ptr<SaveCreditCardDecoration> save_credit_card_decoration_; |
255 | 255 |
256 // Bookmark star right of page actions. | 256 // Bookmark star right of page actions. |
257 scoped_ptr<StarDecoration> star_decoration_; | 257 std::unique_ptr<StarDecoration> star_decoration_; |
258 | 258 |
259 // Translate icon at the end of the ominibox. | 259 // Translate icon at the end of the ominibox. |
260 scoped_ptr<TranslateDecoration> translate_decoration_; | 260 std::unique_ptr<TranslateDecoration> translate_decoration_; |
261 | 261 |
262 // A zoom icon at the end of the omnibox, which shows at non-standard zoom | 262 // A zoom icon at the end of the omnibox, which shows at non-standard zoom |
263 // levels. | 263 // levels. |
264 scoped_ptr<ZoomDecoration> zoom_decoration_; | 264 std::unique_ptr<ZoomDecoration> zoom_decoration_; |
265 | 265 |
266 // Decorations for the installed Page Actions. | 266 // Decorations for the installed Page Actions. |
267 ScopedVector<PageActionDecoration> page_action_decorations_; | 267 ScopedVector<PageActionDecoration> page_action_decorations_; |
268 | 268 |
269 // The content blocked decorations. | 269 // The content blocked decorations. |
270 ScopedVector<ContentSettingDecoration> content_setting_decorations_; | 270 ScopedVector<ContentSettingDecoration> content_setting_decorations_; |
271 | 271 |
272 // Keyword hint decoration displayed on the right-hand side. | 272 // Keyword hint decoration displayed on the right-hand side. |
273 scoped_ptr<KeywordHintDecoration> keyword_hint_decoration_; | 273 std::unique_ptr<KeywordHintDecoration> keyword_hint_decoration_; |
274 | 274 |
275 // The right-hand-side button to manage passwords associated with a page. | 275 // The right-hand-side button to manage passwords associated with a page. |
276 scoped_ptr<ManagePasswordsDecoration> manage_passwords_decoration_; | 276 std::unique_ptr<ManagePasswordsDecoration> manage_passwords_decoration_; |
277 | 277 |
278 Browser* browser_; | 278 Browser* browser_; |
279 | 279 |
280 // Used to change the visibility of the star decoration. | 280 // Used to change the visibility of the star decoration. |
281 BooleanPrefMember edit_bookmarks_enabled_; | 281 BooleanPrefMember edit_bookmarks_enabled_; |
282 | 282 |
283 // Indicates whether or not the location bar is currently visible. | 283 // Indicates whether or not the location bar is currently visible. |
284 bool location_bar_visible_; | 284 bool location_bar_visible_; |
285 | 285 |
286 // Used to schedule a task for the first run info bubble. | 286 // Used to schedule a task for the first run info bubble. |
287 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; | 287 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; |
288 | 288 |
289 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); | 289 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); |
290 }; | 290 }; |
291 | 291 |
292 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ | 292 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ |
OLD | NEW |