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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 public gfx::AnimationDelegate, | 70 public gfx::AnimationDelegate, |
71 public ChromeOmniboxEditController, | 71 public ChromeOmniboxEditController, |
72 public DropdownBarHostDelegate, | 72 public DropdownBarHostDelegate, |
73 public TemplateURLServiceObserver, | 73 public TemplateURLServiceObserver, |
74 public zoom::ZoomEventManagerObserver { | 74 public zoom::ZoomEventManagerObserver { |
75 public: | 75 public: |
76 class Delegate { | 76 class Delegate { |
77 public: | 77 public: |
78 // Should return the current web contents. | 78 // Should return the current web contents. |
79 virtual content::WebContents* GetWebContents() = 0; | 79 virtual content::WebContents* GetWebContents() = 0; |
80 virtual const content::WebContents* GetWebContents() const = 0; | |
Peter Kasting
2016/12/14 22:47:07
Not clear to me why this is useful, since your Get
meacer
2016/12/16 18:46:17
LocationBarView::GetPreferredSize is a const metho
Peter Kasting
2016/12/20 01:59:31
My point is, the const method you're adding return
meacer
2016/12/21 01:38:56
Done.
| |
80 | 81 |
81 virtual ToolbarModel* GetToolbarModel() = 0; | 82 virtual ToolbarModel* GetToolbarModel() = 0; |
82 virtual const ToolbarModel* GetToolbarModel() const = 0; | 83 virtual const ToolbarModel* GetToolbarModel() const = 0; |
83 | 84 |
84 // Creates PageActionImageView. Caller gets an ownership. | 85 // Creates PageActionImageView. Caller gets an ownership. |
85 virtual PageActionImageView* CreatePageActionImageView( | 86 virtual PageActionImageView* CreatePageActionImageView( |
86 LocationBarView* owner, | 87 LocationBarView* owner, |
87 ExtensionAction* action) = 0; | 88 ExtensionAction* action) = 0; |
88 | 89 |
89 // Returns ContentSettingBubbleModelDelegate. | 90 // Returns ContentSettingBubbleModelDelegate. |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 | 318 |
318 bool ShouldShowKeywordBubble() const; | 319 bool ShouldShowKeywordBubble() const; |
319 | 320 |
320 // Returns true when the current page is explicitly secure or insecure. | 321 // Returns true when the current page is explicitly secure or insecure. |
321 // In these cases, we should show the state of the security chip. | 322 // In these cases, we should show the state of the security chip. |
322 bool ShouldShowSecurityChip() const; | 323 bool ShouldShowSecurityChip() const; |
323 | 324 |
324 // Returns true if the chip should be animated | 325 // Returns true if the chip should be animated |
325 bool ShouldAnimateSecurityChip() const; | 326 bool ShouldAnimateSecurityChip() const; |
326 | 327 |
328 // Returns true when the current page is a chrome-extension:// or a chrome:// | |
329 // URL. | |
Peter Kasting
2016/12/14 22:47:07
This seems inaccurate since we don't return true f
meacer
2016/12/16 18:46:18
Removed and folded into ShouldShowSecurityText.
| |
330 bool ShouldShowExtensionChip() const; | |
Peter Kasting
2016/12/14 22:47:07
Rather than adding this, and then having to add du
meacer
2016/12/16 18:46:17
Sure, done. I checked with the UI folks and they s
| |
331 | |
327 // 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 |
328 // 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 |
329 // current position of the omnibox, calculates what value the desired | 334 // current position of the omnibox, calculates what value the desired |
330 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| | 335 // animation (|hide_url_animation_| if |hide| is true, |show_url_animation_| |
331 // 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 |
332 // 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 |
333 // 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 |
334 // directions from its current location. | 339 // directions from its current location. |
335 double GetValueForAnimation(bool hide) const; | 340 double GetValueForAnimation(bool hide) const; |
336 | 341 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
472 // These allow toggling the verbose security state behavior via flags. | 477 // These allow toggling the verbose security state behavior via flags. |
473 bool should_show_secure_state_; | 478 bool should_show_secure_state_; |
474 bool should_show_nonsecure_state_; | 479 bool should_show_nonsecure_state_; |
475 bool should_animate_secure_state_; | 480 bool should_animate_secure_state_; |
476 bool should_animate_nonsecure_state_; | 481 bool should_animate_nonsecure_state_; |
477 | 482 |
478 DISALLOW_COPY_AND_ASSIGN(LocationBarView); | 483 DISALLOW_COPY_AND_ASSIGN(LocationBarView); |
479 }; | 484 }; |
480 | 485 |
481 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ | 486 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_LOCATION_BAR_VIEW_H_ |
OLD | NEW |