OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/WebKit/chromium/public/WebKitClient.h" | 10 #include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 virtual WebKit::WebString queryLocalizedString( | 62 virtual WebKit::WebString queryLocalizedString( |
63 WebKit::WebLocalizedString::Name name); | 63 WebKit::WebLocalizedString::Name name); |
64 virtual WebKit::WebString queryLocalizedString( | 64 virtual WebKit::WebString queryLocalizedString( |
65 WebKit::WebLocalizedString::Name name, int numeric_value); | 65 WebKit::WebLocalizedString::Name name, int numeric_value); |
66 virtual void suddenTerminationChanged(bool enabled) { } | 66 virtual void suddenTerminationChanged(bool enabled) { } |
67 virtual double currentTime(); | 67 virtual double currentTime(); |
68 virtual void setSharedTimerFiredFunction(void (*func)()); | 68 virtual void setSharedTimerFiredFunction(void (*func)()); |
69 virtual void setSharedTimerFireTime(double fireTime); | 69 virtual void setSharedTimerFireTime(double fireTime); |
70 virtual void stopSharedTimer(); | 70 virtual void stopSharedTimer(); |
71 virtual void callOnMainThread(void (*func)()); | 71 virtual void callOnMainThread(void (*func)()); |
| 72 virtual void callOnMainThread(void (*func)(void*), void* context); |
72 | 73 |
73 void SuspendSharedTimer(); | 74 void SuspendSharedTimer(); |
74 void ResumeSharedTimer(); | 75 void ResumeSharedTimer(); |
75 | 76 |
76 private: | 77 private: |
77 void DoTimeout() { | 78 void DoTimeout() { |
78 if (shared_timer_func_ && !shared_timer_suspended_) | 79 if (shared_timer_func_ && !shared_timer_suspended_) |
79 shared_timer_func_(); | 80 shared_timer_func_(); |
80 } | 81 } |
81 | 82 |
82 MessageLoop* main_loop_; | 83 MessageLoop* main_loop_; |
83 base::OneShotTimer<WebKitClientImpl> shared_timer_; | 84 base::OneShotTimer<WebKitClientImpl> shared_timer_; |
84 void (*shared_timer_func_)(); | 85 void (*shared_timer_func_)(); |
85 double shared_timer_fire_time_; | 86 double shared_timer_fire_time_; |
86 int shared_timer_suspended_; // counter | 87 int shared_timer_suspended_; // counter |
87 | 88 |
88 #if defined(OS_WIN) | 89 #if defined(OS_WIN) |
89 WebThemeEngineImpl theme_engine_; | 90 WebThemeEngineImpl theme_engine_; |
90 #endif | 91 #endif |
91 }; | 92 }; |
92 | 93 |
93 } // namespace webkit_glue | 94 } // namespace webkit_glue |
94 | 95 |
95 #endif // WEBKIT_CLIENT_IMPL_H_ | 96 #endif // WEBKIT_CLIENT_IMPL_H_ |
OLD | NEW |