| 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 "content/child/blink_platform_impl.h" | 5 #include "content/child/blink_platform_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 } | 363 } |
| 364 | 364 |
| 365 WebString BlinkPlatformImpl::userAgent() { | 365 WebString BlinkPlatformImpl::userAgent() { |
| 366 return WebString::fromUTF8(GetContentClient()->GetUserAgent()); | 366 return WebString::fromUTF8(GetContentClient()->GetUserAgent()); |
| 367 } | 367 } |
| 368 | 368 |
| 369 WebString BlinkPlatformImpl::userAgent(const WebURL& url) { | 369 WebString BlinkPlatformImpl::userAgent(const WebURL& url) { |
| 370 return userAgent(); | 370 return userAgent(); |
| 371 } | 371 } |
| 372 | 372 |
| 373 WebData BlinkPlatformImpl::parseDataURL( | 373 WebData BlinkPlatformImpl::parseDataURL(const WebURL& url, |
| 374 const WebURL& url, | 374 WebString& mimetype_out, |
| 375 WebString& mimetype_out, | 375 WebString& charset_out) { |
| 376 WebString& charset_out) { | |
| 377 std::string mime_type, char_set, data; | 376 std::string mime_type, char_set, data; |
| 378 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) | 377 if (net::DataURL::Parse(url, &mime_type, &char_set, &data) |
| 379 && net::IsSupportedMimeType(mime_type)) { | 378 && net::IsSupportedMimeType(mime_type)) { |
| 380 mimetype_out = WebString::fromUTF8(mime_type); | 379 mimetype_out = WebString::fromUTF8(mime_type); |
| 381 charset_out = WebString::fromUTF8(char_set); | 380 charset_out = WebString::fromUTF8(char_set); |
| 382 return data; | 381 return data; |
| 383 } | 382 } |
| 384 return WebData(); | 383 return WebData(); |
| 385 } | 384 } |
| 386 | 385 |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 if (--shared_timer_suspended_ == 0 && | 905 if (--shared_timer_suspended_ == 0 && |
| 907 (!shared_timer_.IsRunning() || | 906 (!shared_timer_.IsRunning() || |
| 908 shared_timer_fire_time_was_set_while_suspended_)) { | 907 shared_timer_fire_time_was_set_while_suspended_)) { |
| 909 shared_timer_fire_time_was_set_while_suspended_ = false; | 908 shared_timer_fire_time_was_set_while_suspended_ = false; |
| 910 setSharedTimerFireInterval( | 909 setSharedTimerFireInterval( |
| 911 shared_timer_fire_time_ - monotonicallyIncreasingTime()); | 910 shared_timer_fire_time_ - monotonicallyIncreasingTime()); |
| 912 } | 911 } |
| 913 } | 912 } |
| 914 | 913 |
| 915 } // namespace content | 914 } // namespace content |
| OLD | NEW |