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

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

Issue 2152823004: [Material][Mac] Animation for Omnibox Verbose State Chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaning up Created 4 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) 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 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 13
14 #include "base/macros.h" 14 #include "base/macros.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/zoom/zoom_event_manager_observer.h" 23 #include "components/zoom/zoom_event_manager_observer.h"
24 24
25 @class AutocompleteTextField; 25 @class AutocompleteTextField;
26 class CommandUpdater; 26 class CommandUpdater;
27 class ContentSettingDecoration; 27 class ContentSettingDecoration;
28 class EVBubbleDecoration; 28 class EVBubbleDecoration;
29 class SecureVerboseBubbleDecoration;
29 class KeywordHintDecoration; 30 class KeywordHintDecoration;
30 class LocationBarDecoration; 31 class LocationBarDecoration;
31 class LocationIconDecoration; 32 class LocationIconDecoration;
32 class ManagePasswordsDecoration; 33 class ManagePasswordsDecoration;
33 class PageActionDecoration; 34 class PageActionDecoration;
34 class Profile; 35 class Profile;
35 class SaveCreditCardDecoration; 36 class SaveCreditCardDecoration;
36 class SelectedKeywordDecoration; 37 class SelectedKeywordDecoration;
37 class StarDecoration; 38 class StarDecoration;
38 class TranslateDecoration; 39 class TranslateDecoration;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 178
178 // ChromeOmniboxEditController: 179 // ChromeOmniboxEditController:
179 void UpdateWithoutTabRestore() override; 180 void UpdateWithoutTabRestore() override;
180 void OnChanged() override; 181 void OnChanged() override;
181 void ShowURL() override; 182 void ShowURL() override;
182 ToolbarModel* GetToolbarModel() override; 183 ToolbarModel* GetToolbarModel() override;
183 const ToolbarModel* GetToolbarModel() const override; 184 const ToolbarModel* GetToolbarModel() const override;
184 content::WebContents* GetWebContents() override; 185 content::WebContents* GetWebContents() override;
185 186
186 bool ShouldShowEVBubble() const; 187 bool ShouldShowEVBubble() const;
188
189 // Returns true if the secure verbose decoration should be displayed. This
190 // includes the EV cert decoration. For Phase 1, the verbose shouldn't be
191 // displayed for "Not Secure".
192 bool ShouldShowSecureVerbose() const;
193
187 NSImage* GetKeywordImage(const base::string16& keyword); 194 NSImage* GetKeywordImage(const base::string16& keyword);
188 195
196 // Returns the color for the vector icon in the location bar.
197 SkColor GetLocationBarIconColor() const;
198
189 AutocompleteTextField* GetAutocompleteTextField() { return field_; } 199 AutocompleteTextField* GetAutocompleteTextField() { return field_; }
190 200
191 // Returns true if the location bar is dark. 201 // Returns true if the location bar is dark.
192 bool IsLocationBarDark() const; 202 bool IsLocationBarDark() const;
193 203
194 ManagePasswordsDecoration* manage_passwords_decoration() { 204 ManagePasswordsDecoration* manage_passwords_decoration() {
195 return manage_passwords_decoration_.get(); 205 return manage_passwords_decoration_.get();
196 } 206 }
197 207
198 Browser* browser() const { return browser_; } 208 Browser* browser() const { return browser_; }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 std::unique_ptr<OmniboxViewMac> omnibox_view_; 265 std::unique_ptr<OmniboxViewMac> omnibox_view_;
256 266
257 AutocompleteTextField* field_; // owned by tab controller 267 AutocompleteTextField* field_; // owned by tab controller
258 268
259 // A decoration that shows an icon to the left of the address. 269 // A decoration that shows an icon to the left of the address.
260 std::unique_ptr<LocationIconDecoration> location_icon_decoration_; 270 std::unique_ptr<LocationIconDecoration> location_icon_decoration_;
261 271
262 // A decoration that shows the keyword-search bubble on the left. 272 // A decoration that shows the keyword-search bubble on the left.
263 std::unique_ptr<SelectedKeywordDecoration> selected_keyword_decoration_; 273 std::unique_ptr<SelectedKeywordDecoration> selected_keyword_decoration_;
264 274
275 // A decoration that shows a security icon and the secure verbose in a
276 // bubble on the left.
277 std::unique_ptr<SecureVerboseBubbleDecoration>
278 secure_verbose_bubble_decoration_;
279
265 // A decoration that shows a lock icon and ev-cert label in a bubble 280 // A decoration that shows a lock icon and ev-cert label in a bubble
266 // on the left. 281 // on the left.
267 std::unique_ptr<EVBubbleDecoration> ev_bubble_decoration_; 282 std::unique_ptr<EVBubbleDecoration> ev_bubble_decoration_;
268 283
269 // Save credit card icon on the right side of the omnibox. 284 // Save credit card icon on the right side of the omnibox.
270 std::unique_ptr<SaveCreditCardDecoration> save_credit_card_decoration_; 285 std::unique_ptr<SaveCreditCardDecoration> save_credit_card_decoration_;
271 286
272 // Bookmark star right of page actions. 287 // Bookmark star right of page actions.
273 std::unique_ptr<StarDecoration> star_decoration_; 288 std::unique_ptr<StarDecoration> star_decoration_;
274 289
(...skipping 24 matching lines...) Expand all
299 // Indicates whether or not the location bar is currently visible. 314 // Indicates whether or not the location bar is currently visible.
300 bool location_bar_visible_; 315 bool location_bar_visible_;
301 316
302 // Used to schedule a task for the first run info bubble. 317 // Used to schedule a task for the first run info bubble.
303 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_; 318 base::WeakPtrFactory<LocationBarViewMac> weak_ptr_factory_;
304 319
305 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac); 320 DISALLOW_COPY_AND_ASSIGN(LocationBarViewMac);
306 }; 321 };
307 322
308 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_ 323 #endif // CHROME_BROWSER_UI_COCOA_LOCATION_BAR_LOCATION_BAR_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698