| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "webkit/glue/dom_operations.h" | 5 #include "webkit/glue/dom_operations.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 WebApplicationInfo::WebApplicationInfo() {} | 272 WebApplicationInfo::WebApplicationInfo() {} |
| 273 | 273 |
| 274 WebApplicationInfo::~WebApplicationInfo() {} | 274 WebApplicationInfo::~WebApplicationInfo() {} |
| 275 | 275 |
| 276 bool ParseIconSizes(const string16& text, | 276 bool ParseIconSizes(const string16& text, |
| 277 std::vector<gfx::Size>* sizes, | 277 std::vector<gfx::Size>* sizes, |
| 278 bool* is_any) { | 278 bool* is_any) { |
| 279 *is_any = false; | 279 *is_any = false; |
| 280 std::vector<string16> size_strings; | 280 std::vector<string16> size_strings; |
| 281 SplitStringAlongWhitespace(text, &size_strings); | 281 base::SplitStringAlongWhitespace(text, &size_strings); |
| 282 for (size_t i = 0; i < size_strings.size(); ++i) { | 282 for (size_t i = 0; i < size_strings.size(); ++i) { |
| 283 if (EqualsASCII(size_strings[i], "any")) { | 283 if (EqualsASCII(size_strings[i], "any")) { |
| 284 *is_any = true; | 284 *is_any = true; |
| 285 } else { | 285 } else { |
| 286 gfx::Size size = ParseIconSize(size_strings[i]); | 286 gfx::Size size = ParseIconSize(size_strings[i]); |
| 287 if (size.width() <= 0 || size.height() <= 0) | 287 if (size.width() <= 0 || size.height() <= 0) |
| 288 return false; // Bogus size. | 288 return false; // Bogus size. |
| 289 sizes->push_back(size); | 289 sizes->push_back(size); |
| 290 } | 290 } |
| 291 } | 291 } |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 if (!element.hasTagName("meta")) | 461 if (!element.hasTagName("meta")) |
| 462 continue; | 462 continue; |
| 463 WebString value = element.getAttribute(attribute_name); | 463 WebString value = element.getAttribute(attribute_name); |
| 464 if (value.isNull() || value != attribute_value) | 464 if (value.isNull() || value != attribute_value) |
| 465 continue; | 465 continue; |
| 466 meta_elements->push_back(element); | 466 meta_elements->push_back(element); |
| 467 } | 467 } |
| 468 } | 468 } |
| 469 | 469 |
| 470 } // webkit_glue | 470 } // webkit_glue |
| OLD | NEW |