| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 WEBKIT_CLIENT_IMPL_H_ | 5 #ifndef WEBKIT_CLIENT_IMPL_H_ |
| 6 #define WEBKIT_CLIENT_IMPL_H_ | 6 #define WEBKIT_CLIENT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/platform_file.h" | 8 #include "base/platform_file.h" |
| 9 #include "base/scoped_ptr.h" |
| 9 #include "base/timer.h" | 10 #include "base/timer.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" |
| 11 #if defined(OS_WIN) | 12 #if defined(OS_WIN) |
| 12 #include "webkit/glue/webthemeengine_impl_win.h" | 13 #include "webkit/glue/webthemeengine_impl_win.h" |
| 13 #elif defined(OS_MACOSX) | 14 #elif defined(OS_MACOSX) |
| 14 #include "webkit/glue/webthemeengine_impl_mac.h" | 15 #include "webkit/glue/webthemeengine_impl_mac.h" |
| 15 #elif defined(OS_POSIX) | 16 #elif defined(OS_POSIX) |
| 16 #include "webkit/glue/webthemeengine_impl_linux.h" | 17 #include "webkit/glue/webthemeengine_impl_linux.h" |
| 17 #endif | 18 #endif |
| 18 | 19 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 virtual double monotonicallyIncreasingTime(); | 74 virtual double monotonicallyIncreasingTime(); |
| 74 virtual void cryptographicallyRandomValues( | 75 virtual void cryptographicallyRandomValues( |
| 75 unsigned char* buffer, size_t length); | 76 unsigned char* buffer, size_t length); |
| 76 virtual void setSharedTimerFiredFunction(void (*func)()); | 77 virtual void setSharedTimerFiredFunction(void (*func)()); |
| 77 virtual void setSharedTimerFireInterval(double interval_seconds); | 78 virtual void setSharedTimerFireInterval(double interval_seconds); |
| 78 #ifndef WEBKIT_USE_MONOTONIC_CLOCK_FOR_TIMER_SCHEDULING | 79 #ifndef WEBKIT_USE_MONOTONIC_CLOCK_FOR_TIMER_SCHEDULING |
| 79 virtual void setSharedTimerFireTime(double fire_time); | 80 virtual void setSharedTimerFireTime(double fire_time); |
| 80 #endif | 81 #endif |
| 81 virtual void stopSharedTimer(); | 82 virtual void stopSharedTimer(); |
| 82 virtual void callOnMainThread(void (*func)(void*), void* context); | 83 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 84 virtual WebKit::WebThread* createThread(const char* name); |
| 83 | 85 |
| 84 void SuspendSharedTimer(); | 86 void SuspendSharedTimer(); |
| 85 void ResumeSharedTimer(); | 87 void ResumeSharedTimer(); |
| 86 | 88 |
| 87 private: | 89 private: |
| 88 void DoTimeout() { | 90 void DoTimeout() { |
| 89 if (shared_timer_func_ && !shared_timer_suspended_) | 91 if (shared_timer_func_ && !shared_timer_suspended_) |
| 90 shared_timer_func_(); | 92 shared_timer_func_(); |
| 91 } | 93 } |
| 92 | 94 |
| 93 MessageLoop* main_loop_; | 95 MessageLoop* main_loop_; |
| 94 base::OneShotTimer<WebKitClientImpl> shared_timer_; | 96 base::OneShotTimer<WebKitClientImpl> shared_timer_; |
| 95 void (*shared_timer_func_)(); | 97 void (*shared_timer_func_)(); |
| 96 double shared_timer_fire_time_; | 98 double shared_timer_fire_time_; |
| 97 int shared_timer_suspended_; // counter | 99 int shared_timer_suspended_; // counter |
| 98 WebThemeEngineImpl theme_engine_; | 100 WebThemeEngineImpl theme_engine_; |
| 99 }; | 101 }; |
| 100 | 102 |
| 101 } // namespace webkit_glue | 103 } // namespace webkit_glue |
| 102 | 104 |
| 103 #endif // WEBKIT_CLIENT_IMPL_H_ | 105 #endif // WEBKIT_CLIENT_IMPL_H_ |
| OLD | NEW |