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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 2144903004: New location security strings and animation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor responses Created 4 years, 3 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_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 protected: 103 protected:
104 virtual ~Delegate() {} 104 virtual ~Delegate() {}
105 }; 105 };
106 106
107 enum ColorKind { 107 enum ColorKind {
108 BACKGROUND = 0, 108 BACKGROUND = 0,
109 TEXT, 109 TEXT,
110 SELECTED_TEXT, 110 SELECTED_TEXT,
111 DEEMPHASIZED_TEXT, 111 DEEMPHASIZED_TEXT,
112 EV_BUBBLE_TEXT_AND_BORDER, 112 SECURITY_CHIP_TEXT,
113 }; 113 };
114 114
115 // The location bar view's class name. 115 // The location bar view's class name.
116 static const char kViewClassName[]; 116 static const char kViewClassName[];
117 117
118 LocationBarView(Browser* browser, 118 LocationBarView(Browser* browser,
119 Profile* profile, 119 Profile* profile,
120 CommandUpdater* command_updater, 120 CommandUpdater* command_updater,
121 Delegate* delegate, 121 Delegate* delegate,
122 bool is_popup_mode); 122 bool is_popup_mode);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed. 312 // Updates |manage_passwords_icon_view_|. Returns true if visibility changed.
313 bool RefreshManagePasswordsIconView(); 313 bool RefreshManagePasswordsIconView();
314 314
315 // Helper to show the first run info bubble. 315 // Helper to show the first run info bubble.
316 void ShowFirstRunBubbleInternal(); 316 void ShowFirstRunBubbleInternal();
317 317
318 // Returns true if the suggest text is valid. 318 // Returns true if the suggest text is valid.
319 bool HasValidSuggestText() const; 319 bool HasValidSuggestText() const;
320 320
321 // Returns text describing the URL's security level, to be placed in the
322 // security chip.
323 base::string16 GetSecurityText() const;
324
321 bool ShouldShowKeywordBubble() const; 325 bool ShouldShowKeywordBubble() const;
322 bool ShouldShowEVBubble() const; 326 bool ShouldShowEVBubble() const;
323 327
328 // Returns true when the current page is explicitly secure or insecure.
329 // In these cases, we should show the state of the security chip.
330 bool ShouldShowSecurityChip() const;
331
324 // Used to "reverse" the URL showing/hiding animations, since we use separate 332 // Used to "reverse" the URL showing/hiding animations, since we use separate
325 // animations whose curves are not true inverses of each other. Based on the 333 // animations whose curves are not true inverses of each other. Based on the
326 // current position of the omnibox, calculates what value the desired 334 // current position of the omnibox, calculates what value the desired
327 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| 335 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_|
328 // if it's false) should be set to in order to produce the same omnibox 336 // if it's false) should be set to in order to produce the same omnibox
329 // position. This way we can stop the old animation, set the new animation to 337 // position. This way we can stop the old animation, set the new animation to
330 // this value, and start it running, and the text will appear to reverse 338 // this value, and start it running, and the text will appear to reverse
331 // directions from its current location. 339 // directions from its current location.
332 double GetValueForAnimation(bool hide) const; 340 double GetValueForAnimation(bool hide) const;
333 341
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 BooleanPrefMember edit_bookmarks_enabled_; 479 BooleanPrefMember edit_bookmarks_enabled_;
472 480
473 // This is a debug state variable that stores if the WebContents was null 481 // This is a debug state variable that stores if the WebContents was null
474 // during the last RefreshPageAction. 482 // during the last RefreshPageAction.
475 bool web_contents_null_at_last_refresh_; 483 bool web_contents_null_at_last_refresh_;
476 484
477 DISALLOW_COPY_AND_ASSIGN(LocationBarView); 485 DISALLOW_COPY_AND_ASSIGN(LocationBarView);
478 }; 486 };
479 487
480 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ 488 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698