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