OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHILD_BLINK_PLATFORM_IMPL_H_ | 5 #ifndef CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 6 #define CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 namespace content { | 44 namespace content { |
45 class BackgroundSyncProvider; | 45 class BackgroundSyncProvider; |
46 class FlingCurveConfiguration; | 46 class FlingCurveConfiguration; |
47 class NotificationDispatcher; | 47 class NotificationDispatcher; |
48 class PermissionDispatcher; | 48 class PermissionDispatcher; |
49 class PushDispatcher; | 49 class PushDispatcher; |
50 class ThreadSafeSender; | 50 class ThreadSafeSender; |
51 class TraceLogObserverAdapter; | 51 class TraceLogObserverAdapter; |
52 class WebCryptoImpl; | 52 class WebCryptoImpl; |
53 class WebGeofencingProviderImpl; | 53 class WebGeofencingProviderImpl; |
54 class WebMemoryDumpProviderAdapter; | |
55 | 54 |
56 class CONTENT_EXPORT BlinkPlatformImpl | 55 class CONTENT_EXPORT BlinkPlatformImpl |
57 : NON_EXPORTED_BASE(public blink::Platform) { | 56 : NON_EXPORTED_BASE(public blink::Platform) { |
58 public: | 57 public: |
59 BlinkPlatformImpl(); | 58 BlinkPlatformImpl(); |
60 explicit BlinkPlatformImpl( | 59 explicit BlinkPlatformImpl( |
61 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); | 60 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner); |
62 ~BlinkPlatformImpl() override; | 61 ~BlinkPlatformImpl() override; |
63 | 62 |
64 // Platform methods (partial implementation): | 63 // Platform methods (partial implementation): |
(...skipping 27 matching lines...) Expand all Loading... |
92 blink::WebSocketHandle* createWebSocketHandle() override; | 91 blink::WebSocketHandle* createWebSocketHandle() override; |
93 blink::WebString userAgent() override; | 92 blink::WebString userAgent() override; |
94 blink::WebData parseDataURL(const blink::WebURL& url, | 93 blink::WebData parseDataURL(const blink::WebURL& url, |
95 blink::WebString& mimetype, | 94 blink::WebString& mimetype, |
96 blink::WebString& charset) override; | 95 blink::WebString& charset) override; |
97 blink::WebURLError cancelledError(const blink::WebURL& url) const override; | 96 blink::WebURLError cancelledError(const blink::WebURL& url) const override; |
98 bool isReservedIPAddress(const blink::WebString& host) const override; | 97 bool isReservedIPAddress(const blink::WebString& host) const override; |
99 bool portAllowed(const blink::WebURL& url) const override; | 98 bool portAllowed(const blink::WebURL& url) const override; |
100 blink::WebThread* createThread(const char* name) override; | 99 blink::WebThread* createThread(const char* name) override; |
101 blink::WebThread* currentThread() override; | 100 blink::WebThread* currentThread() override; |
102 void registerMemoryDumpProvider(blink::WebMemoryDumpProvider* wmdp, | |
103 const char* name) override; | |
104 void unregisterMemoryDumpProvider( | |
105 blink::WebMemoryDumpProvider* wmdp) override; | |
106 blink::WebProcessMemoryDump* createProcessMemoryDump() override; | |
107 blink::Platform::WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid( | 101 blink::Platform::WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid( |
108 const blink::WebString& guidStr) override; | 102 const blink::WebString& guidStr) override; |
109 void addTraceLogEnabledStateObserver( | 103 void addTraceLogEnabledStateObserver( |
110 blink::Platform::TraceLogEnabledStateObserver* observer) override; | 104 blink::Platform::TraceLogEnabledStateObserver* observer) override; |
111 void removeTraceLogEnabledStateObserver( | 105 void removeTraceLogEnabledStateObserver( |
112 blink::Platform::TraceLogEnabledStateObserver* observer) override; | 106 blink::Platform::TraceLogEnabledStateObserver* observer) override; |
113 | 107 |
114 blink::WebData loadResource(const char* name) override; | 108 blink::WebData loadResource(const char* name) override; |
115 blink::WebString queryLocalizedString( | 109 blink::WebString queryLocalizedString( |
116 blink::WebLocalizedString::Name name) override; | 110 blink::WebLocalizedString::Name name) override; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); | 150 void UpdateWebThreadTLS(blink::WebThread* thread, base::WaitableEvent* event); |
157 | 151 |
158 bool IsMainThread() const; | 152 bool IsMainThread() const; |
159 | 153 |
160 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 154 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
161 WebThemeEngineImpl native_theme_engine_; | 155 WebThemeEngineImpl native_theme_engine_; |
162 WebFallbackThemeEngineImpl fallback_theme_engine_; | 156 WebFallbackThemeEngineImpl fallback_theme_engine_; |
163 base::ThreadLocalStorage::Slot current_thread_slot_; | 157 base::ThreadLocalStorage::Slot current_thread_slot_; |
164 webcrypto::WebCryptoImpl web_crypto_; | 158 webcrypto::WebCryptoImpl web_crypto_; |
165 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; | 159 scoped_ptr<WebGeofencingProviderImpl> geofencing_provider_; |
166 base::ScopedPtrHashMap<blink::WebMemoryDumpProvider*, | |
167 scoped_ptr<WebMemoryDumpProviderAdapter>> | |
168 memory_dump_providers_; | |
169 base::ScopedPtrHashMap<blink::Platform::TraceLogEnabledStateObserver*, | 160 base::ScopedPtrHashMap<blink::Platform::TraceLogEnabledStateObserver*, |
170 scoped_ptr<TraceLogObserverAdapter>> | 161 scoped_ptr<TraceLogObserverAdapter>> |
171 trace_log_observers_; | 162 trace_log_observers_; |
172 | 163 |
173 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 164 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
174 scoped_refptr<NotificationDispatcher> notification_dispatcher_; | 165 scoped_refptr<NotificationDispatcher> notification_dispatcher_; |
175 scoped_refptr<PushDispatcher> push_dispatcher_; | 166 scoped_refptr<PushDispatcher> push_dispatcher_; |
176 scoped_ptr<PermissionDispatcher> permission_client_; | 167 scoped_ptr<PermissionDispatcher> permission_client_; |
177 scoped_ptr<BackgroundSyncProvider> main_thread_sync_provider_; | 168 scoped_ptr<BackgroundSyncProvider> main_thread_sync_provider_; |
178 | 169 |
179 scheduler::WebThreadBase* compositor_thread_; | 170 scheduler::WebThreadBase* compositor_thread_; |
180 }; | 171 }; |
181 | 172 |
182 } // namespace content | 173 } // namespace content |
183 | 174 |
184 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ | 175 #endif // CONTENT_CHILD_BLINK_PLATFORM_IMPL_H_ |
OLD | NEW |