| 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" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 const char** arg_names, | 63 const char** arg_names, |
| 64 const unsigned char* arg_types, | 64 const unsigned char* arg_types, |
| 65 const unsigned long long* arg_values, | 65 const unsigned long long* arg_values, |
| 66 const blink::WebConvertableToTraceFormat* convertable_values, | 66 const blink::WebConvertableToTraceFormat* convertable_values, |
| 67 unsigned char flags); | 67 unsigned char flags); |
| 68 virtual void updateTraceEventDuration( | 68 virtual void updateTraceEventDuration( |
| 69 const unsigned char* category_group_enabled, | 69 const unsigned char* category_group_enabled, |
| 70 const char* name, | 70 const char* name, |
| 71 TraceEventHandle); | 71 TraceEventHandle); |
| 72 | 72 |
| 73 virtual blink::WebData loadResource(const char* name); |
| 74 |
| 73 private: | 75 private: |
| 74 void SuspendSharedTimer(); | 76 void SuspendSharedTimer(); |
| 75 void ResumeSharedTimer(); | 77 void ResumeSharedTimer(); |
| 76 | 78 |
| 77 void DoTimeout() { | 79 void DoTimeout() { |
| 78 if (shared_timer_func_ && !shared_timer_suspended_) | 80 if (shared_timer_func_ && !shared_timer_suspended_) |
| 79 shared_timer_func_(); | 81 shared_timer_func_(); |
| 80 } | 82 } |
| 81 | 83 |
| 82 mojo::NetworkServicePtr network_service_; | 84 mojo::NetworkServicePtr network_service_; |
| 83 base::MessageLoop* main_loop_; | 85 base::MessageLoop* main_loop_; |
| 84 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 86 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 85 base::OneShotTimer<PlatformImpl> shared_timer_; | 87 base::OneShotTimer<PlatformImpl> shared_timer_; |
| 86 void (*shared_timer_func_)(); | 88 void (*shared_timer_func_)(); |
| 87 double shared_timer_fire_time_; | 89 double shared_timer_fire_time_; |
| 88 bool shared_timer_fire_time_was_set_while_suspended_; | 90 bool shared_timer_fire_time_was_set_while_suspended_; |
| 89 int shared_timer_suspended_; // counter | 91 int shared_timer_suspended_; // counter |
| 90 sky_viewer_cc::WebCompositorSupportImpl compositor_support_; | 92 sky_viewer_cc::WebCompositorSupportImpl compositor_support_; |
| 91 WebThemeEngineImpl theme_engine_; | 93 WebThemeEngineImpl theme_engine_; |
| 92 WebMimeRegistryImpl mime_registry_; | 94 WebMimeRegistryImpl mime_registry_; |
| 93 | 95 |
| 94 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); | 96 DISALLOW_COPY_AND_ASSIGN(PlatformImpl); |
| 95 }; | 97 }; |
| 96 | 98 |
| 97 } // namespace sky | 99 } // namespace sky |
| 98 | 100 |
| 99 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ | 101 #endif // SKY_VIEWER_PLATFORM_PLATFORM_IMPL_H_ |
| OLD | NEW |