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 COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ | 5 #ifndef COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ |
6 #define COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ | 6 #define COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 | 67 |
68 // Returns the resource_id of the icon to show to the left of the address, | 68 // Returns the resource_id of the icon to show to the left of the address, |
69 // based on the current URL. When search term replacement is active, this | 69 // based on the current URL. When search term replacement is active, this |
70 // returns a search icon. This doesn't cover specialized icons while the | 70 // returns a search icon. This doesn't cover specialized icons while the |
71 // user is editing; see OmniboxView::GetIcon(). | 71 // user is editing; see OmniboxView::GetIcon(). |
72 virtual int GetIcon() const = 0; | 72 virtual int GetIcon() const = 0; |
73 | 73 |
74 // Like GetIcon(), but gets the vector asset ID. | 74 // Like GetIcon(), but gets the vector asset ID. |
75 virtual gfx::VectorIconId GetVectorIcon() const = 0; | 75 virtual gfx::VectorIconId GetVectorIcon() const = 0; |
76 | 76 |
77 // Returns text for the omnibox secure verbose chip. | |
78 virtual base::string16 GetSecureVerboseText() const = 0; | |
79 | |
77 // Returns the name of the EV cert holder. This returns an empty string if | 80 // Returns the name of the EV cert holder. This returns an empty string if |
78 // the security level is not EV_SECURE. | 81 // the security level is not EV_SECURE. |
79 virtual base::string16 GetEVCertName() const = 0; | 82 virtual base::string16 GetEVCertName() const = 0; |
80 | 83 |
81 // Returns whether the URL for the current navigation entry should be | 84 // Returns whether the URL for the current navigation entry should be |
82 // in the location bar. | 85 // in the location bar. |
83 virtual bool ShouldDisplayURL() const = 0; | 86 virtual bool ShouldDisplayURL() const = 0; |
84 | 87 |
88 // Returns the EV cert object. | |
89 virtual scoped_refptr<net::X509Certificate> GetCertificate() const = 0; | |
Peter Kasting
2016/07/19 21:17:21
Nit: Seems like this should maybe be moved up one
Kevin Bailey
2016/08/12 18:49:15
Done. Fixed in toolbar_model_impl.h too.
| |
90 | |
85 // Whether the text in the omnibox is currently being edited. | 91 // Whether the text in the omnibox is currently being edited. |
86 void set_input_in_progress(bool input_in_progress) { | 92 void set_input_in_progress(bool input_in_progress) { |
87 input_in_progress_ = input_in_progress; | 93 input_in_progress_ = input_in_progress; |
88 } | 94 } |
89 bool input_in_progress() const { return input_in_progress_; } | 95 bool input_in_progress() const { return input_in_progress_; } |
90 | 96 |
91 // Whether URL replacement should be enabled. | 97 // Whether URL replacement should be enabled. |
92 void set_url_replacement_enabled(bool enabled) { | 98 void set_url_replacement_enabled(bool enabled) { |
93 url_replacement_enabled_ = enabled; | 99 url_replacement_enabled_ = enabled; |
94 } | 100 } |
95 bool url_replacement_enabled() const { | 101 bool url_replacement_enabled() const { |
96 return url_replacement_enabled_; | 102 return url_replacement_enabled_; |
97 } | 103 } |
98 | 104 |
99 protected: | 105 protected: |
100 ToolbarModel(); | 106 ToolbarModel(); |
101 | 107 |
102 private: | 108 private: |
103 bool input_in_progress_; | 109 bool input_in_progress_; |
104 bool url_replacement_enabled_; | 110 bool url_replacement_enabled_; |
105 | 111 |
106 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); | 112 DISALLOW_COPY_AND_ASSIGN(ToolbarModel); |
107 }; | 113 }; |
108 | 114 |
109 #endif // COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ | 115 #endif // COMPONENTS_TOOLBAR_TOOLBAR_MODEL_H_ |
OLD | NEW |