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/Source/WebKit/chromium/public/WebKitClient.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual void cryptographicallyRandomValues( | 71 virtual void cryptographicallyRandomValues( |
72 unsigned char* buffer, size_t length); | 72 unsigned char* buffer, size_t length); |
73 virtual void setSharedTimerFiredFunction(void (*func)()); | 73 virtual void setSharedTimerFiredFunction(void (*func)()); |
74 virtual void setSharedTimerFireTime(double fireTime); | 74 virtual void setSharedTimerFireTime(double fireTime); |
75 virtual void stopSharedTimer(); | 75 virtual void stopSharedTimer(); |
76 virtual void callOnMainThread(void (*func)(void*), void* context); | 76 virtual void callOnMainThread(void (*func)(void*), void* context); |
77 | 77 |
78 void SuspendSharedTimer(); | 78 void SuspendSharedTimer(); |
79 void ResumeSharedTimer(); | 79 void ResumeSharedTimer(); |
80 | 80 |
81 // Hack for http://crbug.com/71735. | 81 private: |
82 // TODO(jamesr): move this back to the private section once | |
83 // http://crbug.com/72007 is fixed. | |
84 void DoTimeout() { | 82 void DoTimeout() { |
85 if (shared_timer_func_ && !shared_timer_suspended_) | 83 if (shared_timer_func_ && !shared_timer_suspended_) |
86 shared_timer_func_(); | 84 shared_timer_func_(); |
87 } | 85 } |
88 | 86 |
89 private: | |
90 MessageLoop* main_loop_; | 87 MessageLoop* main_loop_; |
91 base::OneShotTimer<WebKitClientImpl> shared_timer_; | 88 base::OneShotTimer<WebKitClientImpl> shared_timer_; |
92 void (*shared_timer_func_)(); | 89 void (*shared_timer_func_)(); |
93 double shared_timer_fire_time_; | 90 double shared_timer_fire_time_; |
94 int shared_timer_suspended_; // counter | 91 int shared_timer_suspended_; // counter |
95 | 92 |
96 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) | 93 #if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) |
97 WebThemeEngineImpl theme_engine_; | 94 WebThemeEngineImpl theme_engine_; |
98 #endif | 95 #endif |
99 }; | 96 }; |
100 | 97 |
101 } // namespace webkit_glue | 98 } // namespace webkit_glue |
102 | 99 |
103 #endif // WEBKIT_CLIENT_IMPL_H_ | 100 #endif // WEBKIT_CLIENT_IMPL_H_ |
OLD | NEW |