| 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 #include "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 (*setter)(settings, it->second, GetScriptForWebSettings(code)); | 593 (*setter)(settings, it->second, GetScriptForWebSettings(code)); |
| 594 } | 594 } |
| 595 } | 595 } |
| 596 } | 596 } |
| 597 | 597 |
| 598 void ApplyBlinkSettings(const base::CommandLine& command_line, | 598 void ApplyBlinkSettings(const base::CommandLine& command_line, |
| 599 WebSettings* settings) { | 599 WebSettings* settings) { |
| 600 if (!command_line.HasSwitch(switches::kBlinkSettings)) | 600 if (!command_line.HasSwitch(switches::kBlinkSettings)) |
| 601 return; | 601 return; |
| 602 | 602 |
| 603 std::vector<std::string> blink_settings = base::SplitString( | 603 std::vector<std::string> blink_settings; |
| 604 command_line.GetSwitchValueASCII(switches::kBlinkSettings), | 604 base::SplitString( |
| 605 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 605 command_line.GetSwitchValueASCII(switches::kBlinkSettings), ',', |
| 606 &blink_settings); |
| 606 for (const std::string& setting : blink_settings) { | 607 for (const std::string& setting : blink_settings) { |
| 607 size_t pos = setting.find('='); | 608 size_t pos = setting.find('='); |
| 608 settings->setFromStrings( | 609 settings->setFromStrings( |
| 609 blink::WebString::fromLatin1(setting.substr(0, pos)), | 610 blink::WebString::fromLatin1(setting.substr(0, pos)), |
| 610 blink::WebString::fromLatin1( | 611 blink::WebString::fromLatin1( |
| 611 pos == std::string::npos ? "" : setting.substr(pos + 1))); | 612 pos == std::string::npos ? "" : setting.substr(pos + 1))); |
| 612 } | 613 } |
| 613 } | 614 } |
| 614 | 615 |
| 615 // Looks up and returns the WebFrame corresponding to a given opener frame | 616 // Looks up and returns the WebFrame corresponding to a given opener frame |
| (...skipping 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3823 std::vector<gfx::Size> sizes; | 3824 std::vector<gfx::Size> sizes; |
| 3824 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); | 3825 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); |
| 3825 if (!url.isEmpty()) | 3826 if (!url.isEmpty()) |
| 3826 urls.push_back( | 3827 urls.push_back( |
| 3827 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); | 3828 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); |
| 3828 } | 3829 } |
| 3829 SendUpdateFaviconURL(urls); | 3830 SendUpdateFaviconURL(urls); |
| 3830 } | 3831 } |
| 3831 | 3832 |
| 3832 } // namespace content | 3833 } // namespace content |
| OLD | NEW |