| 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 "chrome/renderer/webplugin_delegate_proxy.h" | 5 #include "chrome/renderer/webplugin_delegate_proxy.h" |
| 6 | 6 |
| 7 #if defined(TOOLKIT_USES_GTK) | 7 #if defined(TOOLKIT_USES_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 // it's not transparent. | 250 // it's not transparent. |
| 251 if ((color.length() == 5 && !StartsWithASCII(color, "#F", false)) || | 251 if ((color.length() == 5 && !StartsWithASCII(color, "#F", false)) || |
| 252 (color.length() == 9 && !StartsWithASCII(color, "#FF", false))) | 252 (color.length() == 9 && !StartsWithASCII(color, "#FF", false))) |
| 253 return true; | 253 return true; |
| 254 } else if (StartsWithASCII(color, "sc#", false)) { | 254 } else if (StartsWithASCII(color, "sc#", false)) { |
| 255 // It's either sc#A,R,G,B or sc#R,G,B; if the former, check the alpha. | 255 // It's either sc#A,R,G,B or sc#R,G,B; if the former, check the alpha. |
| 256 if (color.length() < 4) | 256 if (color.length() < 4) |
| 257 return false; | 257 return false; |
| 258 std::string value_string = color.substr(3, std::string::npos); | 258 std::string value_string = color.substr(3, std::string::npos); |
| 259 std::vector<std::string> components; | 259 std::vector<std::string> components; |
| 260 SplitString(value_string, ',', &components); | 260 base::SplitString(value_string, ',', &components); |
| 261 if (components.size() == 4 && !StartsWithASCII(components[0], "1", false)) | 261 if (components.size() == 4 && !StartsWithASCII(components[0], "1", false)) |
| 262 return true; | 262 return true; |
| 263 } else if (LowerCaseEqualsASCII(color, "transparent")) { | 263 } else if (LowerCaseEqualsASCII(color, "transparent")) { |
| 264 return true; | 264 return true; |
| 265 } | 265 } |
| 266 // Anything else is a named, opaque color or an RGB form with no alpha. | 266 // Anything else is a named, opaque color or an RGB form with no alpha. |
| 267 return false; | 267 return false; |
| 268 } | 268 } |
| 269 | 269 |
| 270 bool WebPluginDelegateProxy::Initialize(const GURL& url, | 270 bool WebPluginDelegateProxy::Initialize(const GURL& url, |
| (...skipping 1273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1544 if (index->mime_type == "application/x-vnd.moveplayer.qm" || | 1544 if (index->mime_type == "application/x-vnd.moveplayer.qm" || |
| 1545 index->mime_type == "application/x-vnd.moveplay2.qm" || | 1545 index->mime_type == "application/x-vnd.moveplay2.qm" || |
| 1546 index->mime_type == "application/x-vnd.movenetworks.qm" || | 1546 index->mime_type == "application/x-vnd.movenetworks.qm" || |
| 1547 index->mime_type == "application/x-vnd.mnplayer.qm") { | 1547 index->mime_type == "application/x-vnd.mnplayer.qm") { |
| 1548 return true; | 1548 return true; |
| 1549 } | 1549 } |
| 1550 } | 1550 } |
| 1551 return false; | 1551 return false; |
| 1552 } | 1552 } |
| 1553 #endif | 1553 #endif |
| OLD | NEW |