OLD | NEW |
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_WEBKITPLATFORMSUPPORT_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/common/webkitplatformsupport_impl.h" | 12 #include "content/common/webkitplatformsupport_impl.h" |
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi
tory.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerReposi
tory.h" |
16 | 16 |
| 17 namespace cc { |
| 18 class ContextProvider; |
| 19 } |
| 20 |
17 namespace webkit_glue { | 21 namespace webkit_glue { |
18 class WebClipboardImpl; | 22 class WebClipboardImpl; |
19 } | 23 } |
20 | 24 |
21 namespace content { | 25 namespace content { |
22 class GamepadSharedMemoryReader; | 26 class GamepadSharedMemoryReader; |
23 class RendererClipboardClient; | 27 class RendererClipboardClient; |
24 class WebFileSystemImpl; | 28 class WebFileSystemImpl; |
25 class WebSharedWorkerRepositoryImpl; | 29 class WebSharedWorkerRepositoryImpl; |
26 | 30 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 virtual void sampleGamepads(WebKit::WebGamepads&); | 97 virtual void sampleGamepads(WebKit::WebGamepads&); |
94 virtual WebKit::WebString userAgent(const WebKit::WebURL& url); | 98 virtual WebKit::WebString userAgent(const WebKit::WebURL& url); |
95 virtual void GetPlugins(bool refresh, | 99 virtual void GetPlugins(bool refresh, |
96 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; | 100 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; |
97 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( | 101 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( |
98 WebKit::WebRTCPeerConnectionHandlerClient* client); | 102 WebKit::WebRTCPeerConnectionHandlerClient* client); |
99 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( | 103 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( |
100 WebKit::WebMediaStreamCenterClient* client); | 104 WebKit::WebMediaStreamCenterClient* client); |
101 virtual bool processMemorySizesInBytes( | 105 virtual bool processMemorySizesInBytes( |
102 size_t* private_bytes, size_t* shared_bytes); | 106 size_t* private_bytes, size_t* shared_bytes); |
| 107 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D( |
| 108 const WebKit::WebGraphicsContext3D::Attributes& attributes); |
| 109 virtual WebKit::WebGraphicsContext3D* sharedOffscreenGraphicsContext3D(); |
| 110 virtual GrContext* sharedOffscreenGrContext(); |
103 | 111 |
104 // Disables the WebSandboxSupport implementation for testing. | 112 // Disables the WebSandboxSupport implementation for testing. |
105 // Tests that do not set up a full sandbox environment should call | 113 // Tests that do not set up a full sandbox environment should call |
106 // SetSandboxEnabledForTesting(false) _before_ creating any instances | 114 // SetSandboxEnabledForTesting(false) _before_ creating any instances |
107 // of this class, to ensure that we don't attempt to use sandbox-related | 115 // of this class, to ensure that we don't attempt to use sandbox-related |
108 // file descriptors or other resources. | 116 // file descriptors or other resources. |
109 // | 117 // |
110 // Returns the previous |enable| value. | 118 // Returns the previous |enable| value. |
111 static bool SetSandboxEnabledForTesting(bool enable); | 119 static bool SetSandboxEnabledForTesting(bool enable); |
112 | 120 |
113 // Set WebGamepads to return when sampleGamepads() is invoked. | 121 // Set WebGamepads to return when sampleGamepads() is invoked. |
114 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads); | 122 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads); |
115 | 123 |
116 protected: | |
117 virtual GpuChannelHostFactory* GetGpuChannelHostFactory() OVERRIDE; | |
118 | |
119 private: | 124 private: |
120 bool CheckPreparsedJsCachingEnabled() const; | 125 bool CheckPreparsedJsCachingEnabled() const; |
121 | 126 |
122 scoped_ptr<RendererClipboardClient> clipboard_client_; | 127 scoped_ptr<RendererClipboardClient> clipboard_client_; |
123 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; | 128 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; |
124 | 129 |
125 class FileUtilities; | 130 class FileUtilities; |
126 scoped_ptr<FileUtilities> file_utilities_; | 131 scoped_ptr<FileUtilities> file_utilities_; |
127 | 132 |
128 class MimeRegistry; | 133 class MimeRegistry; |
(...skipping 18 matching lines...) Expand all Loading... |
147 // to WorkerService on the browser thread. | 152 // to WorkerService on the browser thread. |
148 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; | 153 scoped_ptr<WebSharedWorkerRepositoryImpl> shared_worker_repository_; |
149 | 154 |
150 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; | 155 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; |
151 | 156 |
152 scoped_ptr<WebFileSystemImpl> web_file_system_; | 157 scoped_ptr<WebFileSystemImpl> web_file_system_; |
153 | 158 |
154 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; | 159 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; |
155 | 160 |
156 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; | 161 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; |
| 162 |
| 163 scoped_refptr<cc::ContextProvider> shared_offscreen_context_; |
157 }; | 164 }; |
158 | 165 |
159 } // namespace content | 166 } // namespace content |
160 | 167 |
161 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ | 168 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ |
OLD | NEW |