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_SEARCH_ENGINES_TEMPLATE_URL_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 | 262 |
| 263 // The raw URL for the TemplateURL, which may not be valid as-is (e.g. because | 263 // The raw URL for the TemplateURL, which may not be valid as-is (e.g. because |
| 264 // it requires substitutions first). This must be non-empty. | 264 // it requires substitutions first). This must be non-empty. |
| 265 void SetURL(const std::string& url); | 265 void SetURL(const std::string& url); |
| 266 const std::string& url() const { return url_; } | 266 const std::string& url() const { return url_; } |
| 267 | 267 |
| 268 // Optional additional raw URLs. | 268 // Optional additional raw URLs. |
| 269 std::string suggestions_url; | 269 std::string suggestions_url; |
| 270 std::string instant_url; | 270 std::string instant_url; |
| 271 | 271 |
| 272 // URLs pointing to regular and high-DPI versions of logos for this search | |
|
msw
2012/08/21 00:37:17
nit: "Optional logo image URLs at 100% and 200% sc
samarth
2012/08/22 03:02:07
Done.
| |
| 273 // provider. Both may be empty. | |
| 274 GURL logo_100_percent_url; | |
| 275 GURL logo_200_percent_url; | |
| 276 | |
| 272 // Optional favicon for the TemplateURL. | 277 // Optional favicon for the TemplateURL. |
| 273 GURL favicon_url; | 278 GURL favicon_url; |
| 274 | 279 |
| 275 // URL to the OSD file this came from. May be empty. | 280 // URL to the OSD file this came from. May be empty. |
| 276 GURL originating_url; | 281 GURL originating_url; |
| 277 | 282 |
| 278 // Whether this TemplateURL is shown in the default list of search providers. | 283 // Whether this TemplateURL is shown in the default list of search providers. |
| 279 // This is just a property and does not indicate whether the TemplateURL has a | 284 // This is just a property and does not indicate whether the TemplateURL has a |
| 280 // TemplateURLRef that supports replacement. Use | 285 // TemplateURLRef that supports replacement. Use |
| 281 // TemplateURL::ShowInDefaultList() to test both. | 286 // TemplateURL::ShowInDefaultList() to test both. |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 362 const string16& short_name() const { return data_.short_name; } | 367 const string16& short_name() const { return data_.short_name; } |
| 363 // An accessor for the short_name, but adjusted so it can be appropriately | 368 // An accessor for the short_name, but adjusted so it can be appropriately |
| 364 // displayed even if it is LTR and the UI is RTL. | 369 // displayed even if it is LTR and the UI is RTL. |
| 365 string16 AdjustedShortNameForLocaleDirection() const; | 370 string16 AdjustedShortNameForLocaleDirection() const; |
| 366 | 371 |
| 367 const string16& keyword() const { return data_.keyword(); } | 372 const string16& keyword() const { return data_.keyword(); } |
| 368 | 373 |
| 369 const std::string& url() const { return data_.url(); } | 374 const std::string& url() const { return data_.url(); } |
| 370 const std::string& suggestions_url() const { return data_.suggestions_url; } | 375 const std::string& suggestions_url() const { return data_.suggestions_url; } |
| 371 const std::string& instant_url() const { return data_.instant_url; } | 376 const std::string& instant_url() const { return data_.instant_url; } |
| 377 const GURL& logo_100_percent_url() const { | |
| 378 return data_.logo_100_percent_url; | |
| 379 } | |
| 380 const GURL& logo_200_percent_url() const { | |
| 381 return data_.logo_200_percent_url; | |
| 382 } | |
| 372 const GURL& favicon_url() const { return data_.favicon_url; } | 383 const GURL& favicon_url() const { return data_.favicon_url; } |
| 373 | 384 |
| 374 const GURL& originating_url() const { return data_.originating_url; } | 385 const GURL& originating_url() const { return data_.originating_url; } |
| 375 | 386 |
| 376 bool show_in_default_list() const { return data_.show_in_default_list; } | 387 bool show_in_default_list() const { return data_.show_in_default_list; } |
| 377 // Returns true if show_in_default_list() is true and this TemplateURL has a | 388 // Returns true if show_in_default_list() is true and this TemplateURL has a |
| 378 // TemplateURLRef that supports replacement. | 389 // TemplateURLRef that supports replacement. |
| 379 bool ShowInDefaultList() const; | 390 bool ShowInDefaultList() const; |
| 380 | 391 |
| 381 bool safe_for_autoreplace() const { return data_.safe_for_autoreplace; } | 392 bool safe_for_autoreplace() const { return data_.safe_for_autoreplace; } |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 442 TemplateURLRef url_ref_; | 453 TemplateURLRef url_ref_; |
| 443 TemplateURLRef suggestions_url_ref_; | 454 TemplateURLRef suggestions_url_ref_; |
| 444 TemplateURLRef instant_url_ref_; | 455 TemplateURLRef instant_url_ref_; |
| 445 | 456 |
| 446 // TODO(sky): Add date last parsed OSD file. | 457 // TODO(sky): Add date last parsed OSD file. |
| 447 | 458 |
| 448 DISALLOW_COPY_AND_ASSIGN(TemplateURL); | 459 DISALLOW_COPY_AND_ASSIGN(TemplateURL); |
| 449 }; | 460 }; |
| 450 | 461 |
| 451 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ | 462 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_H_ |
| OLD | NEW |