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 CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 6 #define CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 // of the form "productname/version", with no other slashes. | 99 // of the form "productname/version", with no other slashes. |
100 // Used as part of the user agent string. | 100 // Used as part of the user agent string. |
101 virtual std::string GetProduct() const; | 101 virtual std::string GetProduct() const; |
102 | 102 |
103 // Returns the user agent. Content may cache this value. | 103 // Returns the user agent. Content may cache this value. |
104 virtual std::string GetUserAgent() const; | 104 virtual std::string GetUserAgent() const; |
105 | 105 |
106 // Returns a string resource given its id. | 106 // Returns a string resource given its id. |
107 virtual base::string16 GetLocalizedString(int message_id) const; | 107 virtual base::string16 GetLocalizedString(int message_id) const; |
108 | 108 |
109 // Returns a string resource given its id, and additionally replace | |
110 // $0 with |string0| and $$ with $. | |
111 virtual base::string16 GetLocalizedStringF( | |
112 int message_id, | |
113 const base::string16& string0) const; | |
David Tseng
2016/02/02 18:38:57
Is it worth it to make this take any number of str
dmazzoni
2016/02/03 17:55:07
Not sure, I'll ask the owners. I lean towards the
| |
114 | |
109 // Return the contents of a resource in a StringPiece given the resource id. | 115 // Return the contents of a resource in a StringPiece given the resource id. |
110 virtual base::StringPiece GetDataResource( | 116 virtual base::StringPiece GetDataResource( |
111 int resource_id, | 117 int resource_id, |
112 ui::ScaleFactor scale_factor) const; | 118 ui::ScaleFactor scale_factor) const; |
113 | 119 |
114 // Returns the raw bytes of a scale independent data resource. | 120 // Returns the raw bytes of a scale independent data resource. |
115 virtual base::RefCountedStaticMemory* GetDataResourceBytes( | 121 virtual base::RefCountedStaticMemory* GetDataResourceBytes( |
116 int resource_id) const; | 122 int resource_id) const; |
117 | 123 |
118 // Returns a native image given its id. | 124 // Returns a native image given its id. |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 ContentPluginClient* plugin_; | 169 ContentPluginClient* plugin_; |
164 // The embedder API for participating in renderer logic. | 170 // The embedder API for participating in renderer logic. |
165 ContentRendererClient* renderer_; | 171 ContentRendererClient* renderer_; |
166 // The embedder API for participating in utility logic. | 172 // The embedder API for participating in utility logic. |
167 ContentUtilityClient* utility_; | 173 ContentUtilityClient* utility_; |
168 }; | 174 }; |
169 | 175 |
170 } // namespace content | 176 } // namespace content |
171 | 177 |
172 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ | 178 #endif // CONTENT_PUBLIC_COMMON_CONTENT_CLIENT_H_ |
OLD | NEW |