| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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_TOOLBAR_TOOLBAR_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // Returns the resource_id of the icon to show to the left of the address, | 76 // Returns the resource_id of the icon to show to the left of the address, |
| 77 // based on the current URL. When search term replacement is active, this | 77 // based on the current URL. When search term replacement is active, this |
| 78 // returns a search icon. This doesn't cover specialized icons while the | 78 // returns a search icon. This doesn't cover specialized icons while the |
| 79 // user is editing; see OmniboxView::GetIcon(). | 79 // user is editing; see OmniboxView::GetIcon(). |
| 80 virtual int GetIcon() const = 0; | 80 virtual int GetIcon() const = 0; |
| 81 | 81 |
| 82 // As |GetIcon()|, but returns the icon only taking into account the security | 82 // As |GetIcon()|, but returns the icon only taking into account the security |
| 83 // |level| given, ignoring search term replacement state. | 83 // |level| given, ignoring search term replacement state. |
| 84 virtual int GetIconForSecurityLevel(SecurityLevel level) const = 0; | 84 virtual int GetIconForSecurityLevel(SecurityLevel level) const = 0; |
| 85 | 85 |
| 86 // Returns the name of the EV cert holder. Only call this when the security | 86 // Returns the name of the EV cert holder. This returns an empty string if |
| 87 // level is EV_SECURE. | 87 // the security level is not EV_SECURE. |
| 88 virtual base::string16 GetEVCertName() const = 0; | 88 virtual base::string16 GetEVCertName() const = 0; |
| 89 | 89 |
| 90 // Returns whether the URL for the current navigation entry should be | 90 // Returns whether the URL for the current navigation entry should be |
| 91 // in the location bar. | 91 // in the location bar. |
| 92 virtual bool ShouldDisplayURL() const = 0; | 92 virtual bool ShouldDisplayURL() const = 0; |
| 93 | 93 |
| 94 // Returns true if a call to GetText() would return an empty string instead of | 94 // Returns true if a call to GetText() would return an empty string instead of |
| 95 // the URL that would have otherwise been displayed because the host/origin is | 95 // the URL that would have otherwise been displayed because the host/origin is |
| 96 // instead being displayed in the origin chip. This returns false when we | 96 // instead being displayed in the origin chip. This returns false when we |
| 97 // wouldn't have displayed a URL to begin with (e.g. for the NTP). | 97 // wouldn't have displayed a URL to begin with (e.g. for the NTP). |
| (...skipping 30 matching lines...) Expand all Loading... |
| 128 | 128 |
| 129 private: | 129 private: |
| 130 bool input_in_progress_; | 130 bool input_in_progress_; |
| 131 bool origin_chip_enabled_; | 131 bool origin_chip_enabled_; |
| 132 bool url_replacement_enabled_; | 132 bool url_replacement_enabled_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); | 134 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ | 137 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_MODEL_H_ |
| OLD | NEW |