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_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 Loading... | |
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 Loading... | |
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; | |
Peter Kasting
2016/08/26 20:59:12
Nit: Blank line below
Kevin Bailey
2016/08/29 13:38:10
Done.
| |
321 bool ShouldShowKeywordBubble() const; | 324 bool ShouldShowKeywordBubble() const; |
322 bool ShouldShowEVBubble() const; | 325 bool ShouldShowEVBubble() const; |
323 | 326 |
327 // Returns true if the security chip should be displayed (if it has a | |
328 // verified security level.) | |
Peter Kasting
2016/08/26 20:59:12
Nit: As a reader I'm not really sure what "verifie
Kevin Bailey
2016/08/29 13:38:10
Done.
| |
329 bool ShouldShowSecurityChip() const; | |
330 | |
324 // Used to "reverse" the URL showing/hiding animations, since we use separate | 331 // 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 | 332 // animations whose curves are not true inverses of each other. Based on the |
326 // current position of the omnibox, calculates what value the desired | 333 // current position of the omnibox, calculates what value the desired |
327 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| | 334 // 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 | 335 // 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 | 336 // 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 | 337 // this value, and start it running, and the text will appear to reverse |
331 // directions from its current location. | 338 // directions from its current location. |
332 double GetValueForAnimation(bool hide) const; | 339 double GetValueForAnimation(bool hide) const; |
333 | 340 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 BooleanPrefMember edit_bookmarks_enabled_; | 478 BooleanPrefMember edit_bookmarks_enabled_; |
472 | 479 |
473 // This is a debug state variable that stores if the WebContents was null | 480 // This is a debug state variable that stores if the WebContents was null |
474 // during the last RefreshPageAction. | 481 // during the last RefreshPageAction. |
475 bool web_contents_null_at_last_refresh_; | 482 bool web_contents_null_at_last_refresh_; |
476 | 483 |
477 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 484 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
478 }; | 485 }; |
479 | 486 |
480 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 487 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |