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

Side by Side Diff: content/renderer/renderer_blink_platform_impl.h

Issue 1366883002: [Reland] Post loading tasks on the appropriate WebFrameScheduler's queue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a clone method to WebTaskRunner which lets us solve the lifetime issue. Created 5 years, 2 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
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 CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 5 #ifndef CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 6 #define CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 const blink::WebDeviceOrientationData& data); 198 const blink::WebDeviceOrientationData& data);
199 199
200 // Notifies blink::WebBatteryStatusListener that battery status has changed. 200 // Notifies blink::WebBatteryStatusListener that battery status has changed.
201 void MockBatteryStatusChangedForTesting( 201 void MockBatteryStatusChangedForTesting(
202 const blink::WebBatteryStatus& status); 202 const blink::WebBatteryStatus& status);
203 203
204 WebDatabaseObserverImpl* web_database_observer_impl() { 204 WebDatabaseObserverImpl* web_database_observer_impl() {
205 return web_database_observer_impl_.get(); 205 return web_database_observer_impl_.get();
206 } 206 }
207 207
208 protected:
209 scoped_refptr<base::SingleThreadTaskRunner>
210 LoadingTaskRunnerForCurrentThread() override;
211
208 private: 212 private:
209 bool CheckPreparsedJsCachingEnabled() const; 213 bool CheckPreparsedJsCachingEnabled() const;
210 214
211 // Factory that takes a type and return PlatformEventObserverBase that matches 215 // Factory that takes a type and return PlatformEventObserverBase that matches
212 // it. 216 // it.
213 static PlatformEventObserverBase* CreatePlatformEventObserverFromType( 217 static PlatformEventObserverBase* CreatePlatformEventObserverFromType(
214 blink::WebPlatformEventType type); 218 blink::WebPlatformEventType type);
215 219
216 // Use the data previously set via SetMockDevice...DataForTesting() and send 220 // Use the data previously set via SetMockDevice...DataForTesting() and send
217 // them to the registered listener. 221 // them to the registered listener.
(...skipping 29 matching lines...) Expand all
247 251
248 scoped_ptr<blink::WebBlobRegistry> blob_registry_; 252 scoped_ptr<blink::WebBlobRegistry> blob_registry_;
249 253
250 WebPublicSuffixListImpl public_suffix_list_; 254 WebPublicSuffixListImpl public_suffix_list_;
251 255
252 scoped_ptr<DeviceLightEventPump> device_light_event_pump_; 256 scoped_ptr<DeviceLightEventPump> device_light_event_pump_;
253 scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_; 257 scoped_ptr<DeviceMotionEventPump> device_motion_event_pump_;
254 scoped_ptr<DeviceOrientationEventPump> device_orientation_event_pump_; 258 scoped_ptr<DeviceOrientationEventPump> device_orientation_event_pump_;
255 259
256 scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_; 260 scoped_refptr<base::SingleThreadTaskRunner> default_task_runner_;
261 scoped_refptr<base::SingleThreadTaskRunner> loading_task_runner_;
257 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_; 262 scoped_refptr<IPC::SyncMessageFilter> sync_message_filter_;
258 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 263 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
259 scoped_refptr<QuotaMessageFilter> quota_message_filter_; 264 scoped_refptr<QuotaMessageFilter> quota_message_filter_;
260 265
261 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; 266 scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_;
262 267
263 cc_blink::WebCompositorSupportImpl compositor_support_; 268 cc_blink::WebCompositorSupportImpl compositor_support_;
264 269
265 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; 270 scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_;
266 271
267 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_; 272 scoped_ptr<BatteryStatusDispatcher> battery_status_dispatcher_;
268 273
269 // Handle to the Vibration mojo service. 274 // Handle to the Vibration mojo service.
270 device::VibrationManagerPtr vibration_manager_; 275 device::VibrationManagerPtr vibration_manager_;
271 276
272 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_; 277 IDMap<PlatformEventObserverBase, IDMapOwnPointer> platform_event_observers_;
273 278
274 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl); 279 DISALLOW_COPY_AND_ASSIGN(RendererBlinkPlatformImpl);
275 }; 280 };
276 281
277 } // namespace content 282 } // namespace content
278 283
279 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_ 284 #endif // CONTENT_RENDERER_RENDERER_BLINK_PLATFORM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698