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

Side by Side Diff: webkit/tools/test_shell/test_shell_webkit_init.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix windows build Created 8 years, 10 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 #include "webkit/tools/test_shell/test_shell_webkit_init.h" 5 #include "webkit/tools/test_shell/test_shell_webkit_init.h"
6 6
7 #include "base/metrics/stats_counters.h" 7 #include "base/metrics/stats_counters.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "media/base/media.h" 9 #include "media/base/media.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCache.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 const WebKit::WebString& keyPath) { 293 const WebKit::WebString& keyPath) {
294 return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue( 294 return WebKit::WebIDBKey::injectIDBKeyIntoSerializedValue(
295 key, value, WebKit::WebIDBKeyPath::create(keyPath)); 295 key, value, WebKit::WebIDBKeyPath::create(keyPath));
296 } 296 }
297 297
298 WebKit::WebSharedWorkerRepository* 298 WebKit::WebSharedWorkerRepository*
299 TestShellWebKitInit::sharedWorkerRepository() { 299 TestShellWebKitInit::sharedWorkerRepository() {
300 return NULL; 300 return NULL;
301 } 301 }
302 302
303 WebKit::WebGraphicsContext3D* TestShellWebKitInit::createGraphicsContext3D() {
304 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(
305 gfx::kNullPluginWindow, NULL);
306 }
307
308 WebKit::WebGraphicsContext3D* 303 WebKit::WebGraphicsContext3D*
309 TestShellWebKitInit::createOffscreenGraphicsContext3D( 304 TestShellWebKitInit::createOffscreenGraphicsContext3D(
310 const WebKit::WebGraphicsContext3D::Attributes& attributes) { 305 const WebKit::WebGraphicsContext3D::Attributes& attributes) {
311 scoped_ptr<WebGraphicsContext3D> context( 306 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView(
312 new webkit::gpu::WebGraphicsContext3DInProcessImpl( 307 attributes, NULL, false);
313 gfx::kNullPluginWindow, NULL));
314 if (!context->initialize(attributes, NULL, false))
315 return NULL;
316 return context.release();
317 } 308 }
318 309
319 void TestShellWebKitInit::GetPlugins( 310 void TestShellWebKitInit::GetPlugins(
320 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) { 311 bool refresh, std::vector<webkit::WebPluginInfo>* plugins) {
321 if (refresh) 312 if (refresh)
322 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); 313 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
323 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); 314 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
324 // Don't load the forked TestNetscapePlugIn in the chromium code, use 315 // Don't load the forked TestNetscapePlugIn in the chromium code, use
325 // the copy in webkit.org's repository instead. 316 // the copy in webkit.org's repository instead.
326 const FilePath::StringType kPluginBlackList[] = { 317 const FilePath::StringType kPluginBlackList[] = {
(...skipping 16 matching lines...) Expand all
343 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 334 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
344 return SimpleResourceLoaderBridge::Create(request_info); 335 return SimpleResourceLoaderBridge::Create(request_info);
345 } 336 }
346 337
347 webkit_glue::WebSocketStreamHandleBridge* 338 webkit_glue::WebSocketStreamHandleBridge*
348 TestShellWebKitInit::CreateWebSocketBridge( 339 TestShellWebKitInit::CreateWebSocketBridge(
349 WebKit::WebSocketStreamHandle* handle, 340 WebKit::WebSocketStreamHandle* handle,
350 webkit_glue::WebSocketStreamHandleDelegate* delegate) { 341 webkit_glue::WebSocketStreamHandleDelegate* delegate) {
351 return SimpleSocketStreamBridge::Create(handle, delegate); 342 return SimpleSocketStreamBridge::Create(handle, delegate);
352 } 343 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_webkit_init.h ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698