| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "sky/engine/testing/platform/platform_impl.h" | 5 #include "sky/engine/testing/platform/platform_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 blink::WebScrollbarBehavior* PlatformImpl::scrollbarBehavior() { | 98 blink::WebScrollbarBehavior* PlatformImpl::scrollbarBehavior() { |
| 99 return &scrollbar_behavior_; | 99 return &scrollbar_behavior_; |
| 100 } | 100 } |
| 101 | 101 |
| 102 const unsigned char* PlatformImpl::getTraceCategoryEnabledFlag( | 102 const unsigned char* PlatformImpl::getTraceCategoryEnabledFlag( |
| 103 const char* category_name) { | 103 const char* category_name) { |
| 104 static const unsigned char buf[] = "*"; | 104 static const unsigned char buf[] = "*"; |
| 105 return buf; | 105 return buf; |
| 106 } | 106 } |
| 107 | 107 |
| 108 blink::WebData PlatformImpl::parseDataURL( | |
| 109 const blink::WebURL& url, | |
| 110 blink::WebString& mimetype_out, | |
| 111 blink::WebString& charset_out) { | |
| 112 std::string mimetype, charset, data; | |
| 113 if (net::DataURL::Parse(url, &mimetype, &charset, &data) | |
| 114 && net::IsSupportedMimeType(mimetype)) { | |
| 115 mimetype_out = blink::WebString::fromUTF8(mimetype); | |
| 116 charset_out = blink::WebString::fromUTF8(charset); | |
| 117 return data; | |
| 118 } | |
| 119 return blink::WebData(); | |
| 120 } | |
| 121 | |
| 122 } // namespace sky | 108 } // namespace sky |
| OLD | NEW |