Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: webkit/glue/webkitplatformsupport_impl.h

Issue 14619019: Move compositor support out of base WebKitPlatformSupport into renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PLATFORM_SUPPORT_IMPL_H_ 5 #ifndef WEBKIT_PLATFORM_SUPPORT_IMPL_H_
6 #define WEBKIT_PLATFORM_SUPPORT_IMPL_H_ 6 #define WEBKIT_PLATFORM_SUPPORT_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 14 matching lines...) Expand all
25 #elif defined(OS_ANDROID) 25 #elif defined(OS_ANDROID)
26 #include "webkit/glue/webthemeengine_impl_android.h" 26 #include "webkit/glue/webthemeengine_impl_android.h"
27 #include "webkit/media/audio_decoder.h" 27 #include "webkit/media/audio_decoder.h"
28 #endif 28 #endif
29 29
30 namespace base { 30 namespace base {
31 class MessageLoop; 31 class MessageLoop;
32 } 32 }
33 33
34 namespace webkit { 34 namespace webkit {
35 class WebCompositorSupportImpl;
36 struct WebPluginInfo; 35 struct WebPluginInfo;
37 } 36 }
38 37
39 namespace WebKit { 38 namespace WebKit {
40 class WebSocketStreamHandle; 39 class WebSocketStreamHandle;
41 } 40 }
42 41
43 namespace webkit_glue { 42 namespace webkit_glue {
44 43
45 class FlingCurveConfiguration; 44 class FlingCurveConfiguration;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 virtual double currentTime(); 121 virtual double currentTime();
123 virtual double monotonicallyIncreasingTime(); 122 virtual double monotonicallyIncreasingTime();
124 virtual void cryptographicallyRandomValues( 123 virtual void cryptographicallyRandomValues(
125 unsigned char* buffer, size_t length); 124 unsigned char* buffer, size_t length);
126 virtual void setSharedTimerFiredFunction(void (*func)()); 125 virtual void setSharedTimerFiredFunction(void (*func)());
127 virtual void setSharedTimerFireInterval(double interval_seconds); 126 virtual void setSharedTimerFireInterval(double interval_seconds);
128 virtual void stopSharedTimer(); 127 virtual void stopSharedTimer();
129 virtual void callOnMainThread(void (*func)(void*), void* context); 128 virtual void callOnMainThread(void (*func)(void*), void* context);
130 virtual WebKit::WebThread* createThread(const char* name); 129 virtual WebKit::WebThread* createThread(const char* name);
131 virtual WebKit::WebThread* currentThread(); 130 virtual WebKit::WebThread* currentThread();
132 virtual WebKit::WebCompositorSupport* compositorSupport();
133 virtual WebKit::WebDiscardableMemory* allocateAndLockDiscardableMemory( 131 virtual WebKit::WebDiscardableMemory* allocateAndLockDiscardableMemory(
134 size_t bytes); 132 size_t bytes);
135 133
136 134
137 // Embedder functions. The following are not implemented by the glue layer and 135 // Embedder functions. The following are not implemented by the glue layer and
138 // need to be specialized by the embedder. 136 // need to be specialized by the embedder.
139 137
140 // Gets a localized string given a message id. Returns an empty string if the 138 // Gets a localized string given a message id. Returns an empty string if the
141 // message id is not found. 139 // message id is not found.
142 virtual base::string16 GetLocalizedString(int message_id) = 0; 140 virtual base::string16 GetLocalizedString(int message_id) = 0;
(...skipping 21 matching lines...) Expand all
164 virtual void didStartWorkerRunLoop( 162 virtual void didStartWorkerRunLoop(
165 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; 163 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE;
166 virtual void didStopWorkerRunLoop( 164 virtual void didStopWorkerRunLoop(
167 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE; 165 const WebKit::WebWorkerRunLoop& runLoop) OVERRIDE;
168 166
169 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( 167 virtual WebKit::WebGestureCurve* createFlingAnimationCurve(
170 int device_source, 168 int device_source,
171 const WebKit::WebFloatPoint& velocity, 169 const WebKit::WebFloatPoint& velocity,
172 const WebKit::WebSize& cumulative_scroll) OVERRIDE; 170 const WebKit::WebSize& cumulative_scroll) OVERRIDE;
173 171
174 webkit::WebCompositorSupportImpl* compositor_support_impl() const {
175 return compositor_support_.get();
176 }
177
178 #if defined(OS_ANDROID) 172 #if defined(OS_ANDROID)
179 virtual webkit_media::WebAudioMediaCodecRunner 173 virtual webkit_media::WebAudioMediaCodecRunner
180 GetWebAudioMediaCodecRunner(); 174 GetWebAudioMediaCodecRunner();
181 #endif 175 #endif
182 private: 176 private:
183 void DoTimeout() { 177 void DoTimeout() {
184 if (shared_timer_func_ && !shared_timer_suspended_) 178 if (shared_timer_func_ && !shared_timer_suspended_)
185 shared_timer_func_(); 179 shared_timer_func_();
186 } 180 }
187 static void DestroyCurrentThread(void*); 181 static void DestroyCurrentThread(void*);
188 182
189 base::MessageLoop* main_loop_; 183 base::MessageLoop* main_loop_;
190 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_; 184 base::OneShotTimer<WebKitPlatformSupportImpl> shared_timer_;
191 void (*shared_timer_func_)(); 185 void (*shared_timer_func_)();
192 double shared_timer_fire_time_; 186 double shared_timer_fire_time_;
193 bool shared_timer_fire_time_was_set_while_suspended_; 187 bool shared_timer_fire_time_was_set_while_suspended_;
194 int shared_timer_suspended_; // counter 188 int shared_timer_suspended_; // counter
195 WebThemeEngineImpl theme_engine_; 189 WebThemeEngineImpl theme_engine_;
196 base::ThreadLocalStorage::Slot current_thread_slot_; 190 base::ThreadLocalStorage::Slot current_thread_slot_;
197 scoped_ptr<webkit::WebCompositorSupportImpl> compositor_support_;
198 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_; 191 scoped_ptr<FlingCurveConfiguration> fling_curve_configuration_;
199 }; 192 };
200 193
201 } // namespace webkit_glue 194 } // namespace webkit_glue
202 195
203 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_ 196 #endif // WEBKIT_PLATFORM_SUPPORT_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/renderer_webkitplatformsupport_impl.cc ('k') | webkit/glue/webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698