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

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

Issue 12212100: Provide shared context to Platform API in renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseforreals Created 7 years, 9 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 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 ThreadSafeSender; 28 class ThreadSafeSender;
25 class WebFileSystemImpl; 29 class WebFileSystemImpl;
26 class WebSharedWorkerRepositoryImpl; 30 class WebSharedWorkerRepositoryImpl;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 virtual void sampleGamepads(WebKit::WebGamepads&); 98 virtual void sampleGamepads(WebKit::WebGamepads&);
95 virtual WebKit::WebString userAgent(const WebKit::WebURL& url); 99 virtual WebKit::WebString userAgent(const WebKit::WebURL& url);
96 virtual void GetPlugins(bool refresh, 100 virtual void GetPlugins(bool refresh,
97 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; 101 std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE;
98 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler( 102 virtual WebKit::WebRTCPeerConnectionHandler* createRTCPeerConnectionHandler(
99 WebKit::WebRTCPeerConnectionHandlerClient* client); 103 WebKit::WebRTCPeerConnectionHandlerClient* client);
100 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter( 104 virtual WebKit::WebMediaStreamCenter* createMediaStreamCenter(
101 WebKit::WebMediaStreamCenterClient* client); 105 WebKit::WebMediaStreamCenterClient* client);
102 virtual bool processMemorySizesInBytes( 106 virtual bool processMemorySizesInBytes(
103 size_t* private_bytes, size_t* shared_bytes); 107 size_t* private_bytes, size_t* shared_bytes);
108 virtual WebKit::WebGraphicsContext3D* createOffscreenGraphicsContext3D(
109 const WebKit::WebGraphicsContext3D::Attributes& attributes);
110 virtual WebKit::WebGraphicsContext3D* sharedOffscreenGraphicsContext3D();
111 virtual GrContext* sharedOffscreenGrContext();
104 112
105 // Disables the WebSandboxSupport implementation for testing. 113 // Disables the WebSandboxSupport implementation for testing.
106 // Tests that do not set up a full sandbox environment should call 114 // Tests that do not set up a full sandbox environment should call
107 // SetSandboxEnabledForTesting(false) _before_ creating any instances 115 // SetSandboxEnabledForTesting(false) _before_ creating any instances
108 // of this class, to ensure that we don't attempt to use sandbox-related 116 // of this class, to ensure that we don't attempt to use sandbox-related
109 // file descriptors or other resources. 117 // file descriptors or other resources.
110 // 118 //
111 // Returns the previous |enable| value. 119 // Returns the previous |enable| value.
112 static bool SetSandboxEnabledForTesting(bool enable); 120 static bool SetSandboxEnabledForTesting(bool enable);
113 121
114 // Set WebGamepads to return when sampleGamepads() is invoked. 122 // Set WebGamepads to return when sampleGamepads() is invoked.
115 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads); 123 static void SetMockGamepadsForTesting(const WebKit::WebGamepads& pads);
116 124
117 protected:
118 virtual GpuChannelHostFactory* GetGpuChannelHostFactory() OVERRIDE;
119
120 private: 125 private:
121 bool CheckPreparsedJsCachingEnabled() const; 126 bool CheckPreparsedJsCachingEnabled() const;
122 127
123 scoped_ptr<RendererClipboardClient> clipboard_client_; 128 scoped_ptr<RendererClipboardClient> clipboard_client_;
124 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_; 129 scoped_ptr<webkit_glue::WebClipboardImpl> clipboard_;
125 130
126 class FileUtilities; 131 class FileUtilities;
127 scoped_ptr<FileUtilities> file_utilities_; 132 scoped_ptr<FileUtilities> file_utilities_;
128 133
129 class MimeRegistry; 134 class MimeRegistry;
(...skipping 20 matching lines...) Expand all
150 155
151 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_; 156 scoped_ptr<WebKit::WebIDBFactory> web_idb_factory_;
152 157
153 scoped_ptr<WebFileSystemImpl> web_file_system_; 158 scoped_ptr<WebFileSystemImpl> web_file_system_;
154 159
155 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_; 160 scoped_ptr<WebKit::WebBlobRegistry> blob_registry_;
156 161
157 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_; 162 scoped_ptr<GamepadSharedMemoryReader> gamepad_shared_memory_reader_;
158 163
159 scoped_refptr<ThreadSafeSender> thread_safe_sender_; 164 scoped_refptr<ThreadSafeSender> thread_safe_sender_;
165
166 scoped_refptr<cc::ContextProvider> shared_offscreen_context_;
160 }; 167 };
161 168
162 } // namespace content 169 } // namespace content
163 170
164 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_ 171 #endif // CONTENT_RENDERER_RENDERER_WEBKITPLATFORMSUPPORT_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | content/renderer/renderer_webkitplatformsupport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698