| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 WebKit::WebString queryLocalizedString( | 66 virtual WebKit::WebString queryLocalizedString( |
| 67 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value); | 67 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value); |
| 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 void cryptographicallyRandomValues( | 74 virtual void cryptographicallyRandomValues( |
| 74 unsigned char* buffer, size_t length); | 75 unsigned char* buffer, size_t length); |
| 75 virtual void setSharedTimerFiredFunction(void (*func)()); | 76 virtual void setSharedTimerFiredFunction(void (*func)()); |
| 76 virtual void setSharedTimerFireTime(double fireTime); | 77 virtual void setSharedTimerFireTime(double fireTime); |
| 77 virtual void stopSharedTimer(); | 78 virtual void stopSharedTimer(); |
| 78 virtual void callOnMainThread(void (*func)(void*), void* context); | 79 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 79 | 80 |
| 80 void SuspendSharedTimer(); | 81 void SuspendSharedTimer(); |
| 81 void ResumeSharedTimer(); | 82 void ResumeSharedTimer(); |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 void DoTimeout() { | 85 void DoTimeout() { |
| 85 if (shared_timer_func_ && !shared_timer_suspended_) | 86 if (shared_timer_func_ && !shared_timer_suspended_) |
| 86 shared_timer_func_(); | 87 shared_timer_func_(); |
| 87 } | 88 } |
| 88 | 89 |
| 89 MessageLoop* main_loop_; | 90 MessageLoop* main_loop_; |
| 90 base::OneShotTimer<WebKitClientImpl> shared_timer_; | 91 base::OneShotTimer<WebKitClientImpl> shared_timer_; |
| 91 void (*shared_timer_func_)(); | 92 void (*shared_timer_func_)(); |
| 92 double shared_timer_fire_time_; | 93 double shared_timer_fire_time_; |
| 93 int shared_timer_suspended_; // counter | 94 int shared_timer_suspended_; // counter |
| 94 WebThemeEngineImpl theme_engine_; | 95 WebThemeEngineImpl theme_engine_; |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 } // namespace webkit_glue | 98 } // namespace webkit_glue |
| 98 | 99 |
| 99 #endif // WEBKIT_CLIENT_IMPL_H_ | 100 #endif // WEBKIT_CLIENT_IMPL_H_ |
| OLD | NEW |