OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/renderer/renderer_webkitclient_impl.h" | 5 #include "chrome/renderer/renderer_webkitclient_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 return NULL; | 502 return NULL; |
503 } | 503 } |
504 } | 504 } |
505 | 505 |
506 WebKit::WebGraphicsContext3D* | 506 WebKit::WebGraphicsContext3D* |
507 RendererWebKitClientImpl::createGraphicsContext3D() { | 507 RendererWebKitClientImpl::createGraphicsContext3D() { |
508 // The WebGraphicsContext3DInProcessImpl code path is used for | 508 // The WebGraphicsContext3DInProcessImpl code path is used for |
509 // layout tests (though not through this code) as well as for | 509 // layout tests (though not through this code) as well as for |
510 // debugging and bringing up new ports. | 510 // debugging and bringing up new ports. |
511 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 511 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
512 return new webkit_gpu::WebGraphicsContext3DInProcessImpl(); | 512 return new webkit::gpu::WebGraphicsContext3DInProcessImpl(); |
513 } else { | 513 } else { |
514 #if defined(ENABLE_GPU) | 514 #if defined(ENABLE_GPU) |
515 return new WebGraphicsContext3DCommandBufferImpl(); | 515 return new WebGraphicsContext3DCommandBufferImpl(); |
516 #else | 516 #else |
517 return NULL; | 517 return NULL; |
518 #endif | 518 #endif |
519 } | 519 } |
520 } | 520 } |
521 | 521 |
522 //------------------------------------------------------------------------------ | 522 //------------------------------------------------------------------------------ |
(...skipping 11 matching lines...) Expand all Loading... |
534 return WebString::fromUTF8(signed_public_key); | 534 return WebString::fromUTF8(signed_public_key); |
535 } | 535 } |
536 | 536 |
537 //------------------------------------------------------------------------------ | 537 //------------------------------------------------------------------------------ |
538 | 538 |
539 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { | 539 WebBlobRegistry* RendererWebKitClientImpl::blobRegistry() { |
540 if (!blob_registry_.get()) | 540 if (!blob_registry_.get()) |
541 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); | 541 blob_registry_.reset(new WebBlobRegistryImpl(RenderThread::current())); |
542 return blob_registry_.get(); | 542 return blob_registry_.get(); |
543 } | 543 } |
OLD | NEW |