| 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 #ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 5 #ifndef SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
| 6 #define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 6 #define SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/threading/thread_local_storage.h" | 10 #include "base/threading/thread_local_storage.h" |
| 11 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
| 12 #include "mojo/services/network/public/interfaces/network_service.mojom.h" | 12 #include "mojo/services/network/public/interfaces/network_service.mojom.h" |
| 13 #include "sky/engine/public/platform/Platform.h" | 13 #include "sky/engine/public/platform/Platform.h" |
| 14 | 14 |
| 15 namespace mojo { | 15 namespace mojo { |
| 16 class ApplicationImpl; | 16 class ApplicationImpl; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace sky { | 19 namespace sky { |
| 20 | 20 |
| 21 class PlatformImpl : public blink::Platform { | 21 class PlatformImpl : public blink::Platform { |
| 22 public: | 22 public: |
| 23 explicit PlatformImpl(mojo::ApplicationImpl* app); | 23 explicit PlatformImpl(mojo::ApplicationImpl* app); |
| 24 virtual ~PlatformImpl(); | 24 virtual ~PlatformImpl(); |
| 25 | 25 |
| 26 // blink::Platform methods: | 26 // blink::Platform methods: |
| 27 virtual blink::WebString defaultLocale(); | 27 virtual blink::WebString defaultLocale(); |
| 28 virtual double currentTime(); | |
| 29 virtual double monotonicallyIncreasingTime(); | |
| 30 virtual void setSharedTimerFiredFunction(void (*func)()); | 28 virtual void setSharedTimerFiredFunction(void (*func)()); |
| 31 virtual void setSharedTimerFireInterval(double interval_seconds); | 29 virtual void setSharedTimerFireInterval(double interval_seconds); |
| 32 virtual void stopSharedTimer(); | 30 virtual void stopSharedTimer(); |
| 33 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner(); | 31 virtual base::SingleThreadTaskRunner* mainThreadTaskRunner(); |
| 34 virtual mojo::NetworkService* networkService(); | 32 virtual mojo::NetworkService* networkService(); |
| 35 virtual blink::WebURLLoader* createURLLoader(); | 33 virtual blink::WebURLLoader* createURLLoader(); |
| 36 virtual blink::WebURLError cancelledError(const blink::WebURL& url) const; | 34 virtual blink::WebURLError cancelledError(const blink::WebURL& url) const; |
| 37 virtual const unsigned char* getTraceCategoryEnabledFlag( | 35 virtual const unsigned char* getTraceCategoryEnabledFlag( |
| 38 const char* category_name); | 36 const char* category_name); |
| 39 virtual long* getTraceSamplingState(const unsigned thread_bucket); | 37 virtual long* getTraceSamplingState(const unsigned thread_bucket); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 double shared_timer_fire_time_; | 78 double shared_timer_fire_time_; |
| 81 bool shared_timer_fire_time_was_set_while_suspended_; | 79 bool shared_timer_fire_time_was_set_while_suspended_; |
| 82 int shared_timer_suspended_; // counter | 80 int shared_timer_suspended_; // counter |
| 83 | 81 |
| 84 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); | 82 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace sky | 85 } // namespace sky |
| 88 | 86 |
| 89 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 87 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
| OLD | NEW |