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

Side by Side Diff: webkit/support/test_webkit_platform_support.cc

Issue 9226036: Refactor WebGraphicsContext3DInProcess and TestWebGraphicsContext3D (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/support/test_webkit_platform_support.h" 5 #include "webkit/support/test_webkit_platform_support.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/metrics/stats_counters.h" 8 #include "base/metrics/stats_counters.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/scoped_temp_dir.h" 10 #include "base/scoped_temp_dir.h"
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() { 366 WebKit::WebThemeEngine* TestWebKitPlatformSupport::themeEngine() {
367 return active_theme_engine_; 367 return active_theme_engine_;
368 } 368 }
369 #endif 369 #endif
370 370
371 WebKit::WebSharedWorkerRepository* 371 WebKit::WebSharedWorkerRepository*
372 TestWebKitPlatformSupport::sharedWorkerRepository() { 372 TestWebKitPlatformSupport::sharedWorkerRepository() {
373 return NULL; 373 return NULL;
374 } 374 }
375 375
376 WebKit::WebGraphicsContext3D*
377 TestWebKitPlatformSupport::createGraphicsContext3D() {
378 switch (webkit_support::GetGraphicsContext3DImplementation()) {
379 case webkit_support::IN_PROCESS:
380 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(
381 gfx::kNullPluginWindow, NULL);
382 case webkit_support::IN_PROCESS_COMMAND_BUFFER:
383 return new webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl();
384 default:
385 CHECK(false) << "Unknown GraphicsContext3D Implementation";
386 return NULL;
387 }
388 }
389
390 double TestWebKitPlatformSupport::audioHardwareSampleRate() { 376 double TestWebKitPlatformSupport::audioHardwareSampleRate() {
391 return 44100.0; 377 return 44100.0;
392 } 378 }
393 379
394 size_t TestWebKitPlatformSupport::audioHardwareBufferSize() { 380 size_t TestWebKitPlatformSupport::audioHardwareBufferSize() {
395 return 128; 381 return 128;
396 } 382 }
397 383
398 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice( 384 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice(
399 size_t bufferSize, unsigned numberOfChannels, double sampleRate, 385 size_t bufferSize, unsigned numberOfChannels, double sampleRate,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) { 423 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info) {
438 return SimpleResourceLoaderBridge::Create(request_info); 424 return SimpleResourceLoaderBridge::Create(request_info);
439 } 425 }
440 426
441 webkit_glue::WebSocketStreamHandleBridge* 427 webkit_glue::WebSocketStreamHandleBridge*
442 TestWebKitPlatformSupport::CreateWebSocketBridge( 428 TestWebKitPlatformSupport::CreateWebSocketBridge(
443 WebKit::WebSocketStreamHandle* handle, 429 WebKit::WebSocketStreamHandle* handle,
444 webkit_glue::WebSocketStreamHandleDelegate* delegate) { 430 webkit_glue::WebSocketStreamHandleDelegate* delegate) {
445 return SimpleSocketStreamBridge::Create(handle, delegate); 431 return SimpleSocketStreamBridge::Create(handle, delegate);
446 } 432 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698