| 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/timer.h" | 9 #include "base/timer.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 virtual WebKit::WebString queryLocalizedString( | 68 virtual WebKit::WebString queryLocalizedString( |
| 69 WebKit::WebLocalizedString::Name name, | 69 WebKit::WebLocalizedString::Name name, |
| 70 const WebKit::WebString& value1, const WebKit::WebString& value2); | 70 const WebKit::WebString& value1, const WebKit::WebString& value2); |
| 71 virtual void suddenTerminationChanged(bool enabled) { } | 71 virtual void suddenTerminationChanged(bool enabled) { } |
| 72 virtual double currentTime(); | 72 virtual double currentTime(); |
| 73 virtual double monotonicallyIncreasingTime(); | 73 virtual double monotonicallyIncreasingTime(); |
| 74 virtual void cryptographicallyRandomValues( | 74 virtual void cryptographicallyRandomValues( |
| 75 unsigned char* buffer, size_t length); | 75 unsigned char* buffer, size_t length); |
| 76 virtual void setSharedTimerFiredFunction(void (*func)()); | 76 virtual void setSharedTimerFiredFunction(void (*func)()); |
| 77 virtual void setSharedTimerFireInterval(double interval_seconds); | 77 virtual void setSharedTimerFireInterval(double interval_seconds); |
| 78 #ifndef WEBKIT_USE_MONOTONIC_CLOCK_FOR_TIMER_SCHEDULING | |
| 79 virtual void setSharedTimerFireTime(double fire_time); | |
| 80 #endif | |
| 81 virtual void stopSharedTimer(); | 78 virtual void stopSharedTimer(); |
| 82 virtual void callOnMainThread(void (*func)(void*), void* context); | 79 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 83 virtual WebKit::WebThread* createThread(const char* name); | 80 virtual WebKit::WebThread* createThread(const char* name); |
| 84 | 81 |
| 85 void SuspendSharedTimer(); | 82 void SuspendSharedTimer(); |
| 86 void ResumeSharedTimer(); | 83 void ResumeSharedTimer(); |
| 87 | 84 |
| 88 private: | 85 private: |
| 89 void DoTimeout() { | 86 void DoTimeout() { |
| 90 if (shared_timer_func_ && !shared_timer_suspended_) | 87 if (shared_timer_func_ && !shared_timer_suspended_) |
| 91 shared_timer_func_(); | 88 shared_timer_func_(); |
| 92 } | 89 } |
| 93 | 90 |
| 94 MessageLoop* main_loop_; | 91 MessageLoop* main_loop_; |
| 95 base::OneShotTimer<WebKitClientImpl> shared_timer_; | 92 base::OneShotTimer<WebKitClientImpl> shared_timer_; |
| 96 void (*shared_timer_func_)(); | 93 void (*shared_timer_func_)(); |
| 97 double shared_timer_fire_time_; | 94 double shared_timer_fire_time_; |
| 98 int shared_timer_suspended_; // counter | 95 int shared_timer_suspended_; // counter |
| 99 WebThemeEngineImpl theme_engine_; | 96 WebThemeEngineImpl theme_engine_; |
| 100 }; | 97 }; |
| 101 | 98 |
| 102 } // namespace webkit_glue | 99 } // namespace webkit_glue |
| 103 | 100 |
| 104 #endif // WEBKIT_CLIENT_IMPL_H_ | 101 #endif // WEBKIT_CLIENT_IMPL_H_ |
| OLD | NEW |