Chromium Code Reviews| 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 318 bool HasValidSuggestText() const; | 318 bool HasValidSuggestText() const; |
| 319 | 319 |
| 320 // Returns text describing the URL's security level, to be placed in the | 320 // Returns text describing the URL's security level, to be placed in the |
| 321 // security chip. | 321 // security chip. |
| 322 base::string16 GetSecurityText() const; | 322 base::string16 GetSecurityText() const; |
| 323 | 323 |
| 324 bool ShouldShowKeywordBubble() const; | 324 bool ShouldShowKeywordBubble() const; |
| 325 bool ShouldShowEVBubble() const; | 325 bool ShouldShowEVBubble() const; |
| 326 | 326 |
| 327 // Returns true when the current page is explicitly secure or insecure. | 327 // Returns true when the current page is explicitly secure or insecure. |
| 328 // In these cases, we should show the state of the security chip. | 328 // In these cases, we should show the state of the security chip. If |
| 329 bool ShouldShowSecurityChip() const; | 329 // should_animate is not null, then set the value to true if the chip should |
|
Peter Kasting
2016/10/10 21:39:21
Nit: "...|should_animate| is non-null, sets it to
spqchan
2016/10/11 17:32:58
Updated the comment
| |
| 330 // be animated. | |
| 331 bool ShouldShowSecurityChip(bool* should_animate) const; | |
|
Peter Kasting
2016/10/10 21:39:21
I think it might make more sense to have separate
Kevin Bailey
2016/10/11 00:44:05
If GetSecurityLevel() were more stable, I would co
Peter Kasting
2016/10/11 00:54:18
No.
If we thought this was problematic, such that
| |
| 330 | 332 |
| 331 // Used to "reverse" the URL showing/hiding animations, since we use separate | 333 // Used to "reverse" the URL showing/hiding animations, since we use separate |
| 332 // animations whose curves are not true inverses of each other. Based on the | 334 // animations whose curves are not true inverses of each other. Based on the |
| 333 // current position of the omnibox, calculates what value the desired | 335 // current position of the omnibox, calculates what value the desired |
| 334 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| | 336 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| |
| 335 // if it's false) should be set to in order to produce the same omnibox | 337 // if it's false) should be set to in order to produce the same omnibox |
| 336 // position. This way we can stop the old animation, set the new animation to | 338 // position. This way we can stop the old animation, set the new animation to |
| 337 // this value, and start it running, and the text will appear to reverse | 339 // this value, and start it running, and the text will appear to reverse |
| 338 // directions from its current location. | 340 // directions from its current location. |
| 339 double GetValueForAnimation(bool hide) const; | 341 double GetValueForAnimation(bool hide) const; |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 473 // Tracks this preference to determine whether bookmark editing is allowed. | 475 // Tracks this preference to determine whether bookmark editing is allowed. |
| 474 BooleanPrefMember edit_bookmarks_enabled_; | 476 BooleanPrefMember edit_bookmarks_enabled_; |
| 475 | 477 |
| 476 // This is a debug state variable that stores if the WebContents was null | 478 // This is a debug state variable that stores if the WebContents was null |
| 477 // during the last RefreshPageAction. | 479 // during the last RefreshPageAction. |
| 478 bool web_contents_null_at_last_refresh_; | 480 bool web_contents_null_at_last_refresh_; |
| 479 | 481 |
| 480 // These allow toggling the verbose security state behavior via flags. | 482 // These allow toggling the verbose security state behavior via flags. |
| 481 bool should_show_secure_state_; | 483 bool should_show_secure_state_; |
| 482 bool should_animate_secure_state_; | 484 bool should_animate_secure_state_; |
| 485 bool should_animate_nonsecure_state_; | |
| 483 | 486 |
| 484 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 487 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
| 485 }; | 488 }; |
| 486 | 489 |
| 487 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 490 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
| OLD | NEW |