| 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" |
| 11 #include "base/synchronization/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "net/base/data_url.h" | 13 #include "net/base/data_url.h" |
| 14 #include "net/base/mime_util.h" | 14 #include "net/base/mime_util.h" |
| 15 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 16 | 16 |
| 17 namespace sky { | 17 namespace sky { |
| 18 | 18 |
| 19 PlatformImpl::PlatformImpl() | 19 PlatformImpl::PlatformImpl() |
| 20 : main_loop_(base::MessageLoop::current()), | 20 : main_loop_(base::MessageLoop::current()), |
| 21 shared_timer_func_(NULL), | 21 shared_timer_func_(NULL), |
| 22 shared_timer_fire_time_(0.0), | 22 shared_timer_fire_time_(0.0), |
| 23 shared_timer_fire_time_was_set_while_suspended_(false), | 23 shared_timer_fire_time_was_set_while_suspended_(false), |
| 24 shared_timer_suspended_(0) { | 24 shared_timer_suspended_(0) { |
| 25 } | 25 } |
| 26 | 26 |
| 27 PlatformImpl::~PlatformImpl() { | 27 PlatformImpl::~PlatformImpl() { |
| 28 } | 28 } |
| 29 | 29 |
| 30 blink::WebThemeEngine* PlatformImpl::themeEngine() { | |
| 31 return &theme_engine_; | |
| 32 } | |
| 33 | |
| 34 blink::WebString PlatformImpl::defaultLocale() { | 30 blink::WebString PlatformImpl::defaultLocale() { |
| 35 return blink::WebString::fromUTF8("en-US"); | 31 return blink::WebString::fromUTF8("en-US"); |
| 36 } | 32 } |
| 37 | 33 |
| 38 double PlatformImpl::currentTime() { | 34 double PlatformImpl::currentTime() { |
| 39 return base::Time::Now().ToDoubleT(); | 35 return base::Time::Now().ToDoubleT(); |
| 40 } | 36 } |
| 41 | 37 |
| 42 double PlatformImpl::monotonicallyIncreasingTime() { | 38 double PlatformImpl::monotonicallyIncreasingTime() { |
| 43 return base::TimeTicks::Now().ToInternalValue() / | 39 return base::TimeTicks::Now().ToInternalValue() / |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 return &unit_test_support_; | 82 return &unit_test_support_; |
| 87 } | 83 } |
| 88 | 84 |
| 89 const unsigned char* PlatformImpl::getTraceCategoryEnabledFlag( | 85 const unsigned char* PlatformImpl::getTraceCategoryEnabledFlag( |
| 90 const char* category_name) { | 86 const char* category_name) { |
| 91 static const unsigned char buf[] = "*"; | 87 static const unsigned char buf[] = "*"; |
| 92 return buf; | 88 return buf; |
| 93 } | 89 } |
| 94 | 90 |
| 95 } // namespace sky | 91 } // namespace sky |
| OLD | NEW |