| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value); | 63 WebKit::WebLocalizedString::Name name, const WebKit::WebString& value); |
| 64 virtual WebKit::WebString queryLocalizedString( | 64 virtual WebKit::WebString queryLocalizedString( |
| 65 WebKit::WebLocalizedString::Name name, | 65 WebKit::WebLocalizedString::Name name, |
| 66 const WebKit::WebString& value1, const WebKit::WebString& value2); | 66 const WebKit::WebString& value1, const WebKit::WebString& value2); |
| 67 virtual void suddenTerminationChanged(bool enabled) { } | 67 virtual void suddenTerminationChanged(bool enabled) { } |
| 68 virtual double currentTime(); | 68 virtual double currentTime(); |
| 69 virtual void setSharedTimerFiredFunction(void (*func)()); | 69 virtual void setSharedTimerFiredFunction(void (*func)()); |
| 70 virtual void setSharedTimerFireTime(double fireTime); | 70 virtual void setSharedTimerFireTime(double fireTime); |
| 71 virtual void stopSharedTimer(); | 71 virtual void stopSharedTimer(); |
| 72 virtual void callOnMainThread(void (*func)(void*), void* context); | 72 virtual void callOnMainThread(void (*func)(void*), void* context); |
| 73 virtual void notifyJSOutOfMemory(); |
| 73 | 74 |
| 74 void SuspendSharedTimer(); | 75 void SuspendSharedTimer(); |
| 75 void ResumeSharedTimer(); | 76 void ResumeSharedTimer(); |
| 76 | 77 |
| 77 private: | 78 private: |
| 78 void DoTimeout() { | 79 void DoTimeout() { |
| 79 if (shared_timer_func_ && !shared_timer_suspended_) | 80 if (shared_timer_func_ && !shared_timer_suspended_) |
| 80 shared_timer_func_(); | 81 shared_timer_func_(); |
| 81 } | 82 } |
| 82 | 83 |
| 83 MessageLoop* main_loop_; | 84 MessageLoop* main_loop_; |
| 84 base::OneShotTimer<WebKitClientImpl> shared_timer_; | 85 base::OneShotTimer<WebKitClientImpl> shared_timer_; |
| 85 void (*shared_timer_func_)(); | 86 void (*shared_timer_func_)(); |
| 86 double shared_timer_fire_time_; | 87 double shared_timer_fire_time_; |
| 87 int shared_timer_suspended_; // counter | 88 int shared_timer_suspended_; // counter |
| 88 | 89 |
| 89 #if defined(OS_WIN) || defined(OS_LINUX) | 90 #if defined(OS_WIN) || defined(OS_LINUX) |
| 90 WebThemeEngineImpl theme_engine_; | 91 WebThemeEngineImpl theme_engine_; |
| 91 #endif | 92 #endif |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 } // namespace webkit_glue | 95 } // namespace webkit_glue |
| 95 | 96 |
| 96 #endif // WEBKIT_CLIENT_IMPL_H_ | 97 #endif // WEBKIT_CLIENT_IMPL_H_ |
| OLD | NEW |