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 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/platform_file.h" | 10 #include "base/platform_file.h" |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 } | 582 } |
583 | 583 |
584 WebKit::WebGraphicsContext3D* | 584 WebKit::WebGraphicsContext3D* |
585 RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( | 585 RendererWebKitPlatformSupportImpl::createOffscreenGraphicsContext3D( |
586 const WebGraphicsContext3D::Attributes& attributes) { | 586 const WebGraphicsContext3D::Attributes& attributes) { |
587 // The WebGraphicsContext3DInProcessImpl code path is used for | 587 // The WebGraphicsContext3DInProcessImpl code path is used for |
588 // layout tests (though not through this code) as well as for | 588 // layout tests (though not through this code) as well as for |
589 // debugging and bringing up new ports. | 589 // debugging and bringing up new ports. |
590 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { | 590 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessWebGL)) { |
591 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( | 591 return webkit::gpu::WebGraphicsContext3DInProcessImpl::CreateForWebView( |
592 attributes, NULL, false); | 592 attributes, false); |
593 } else { | 593 } else { |
594 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> null_client; | 594 base::WeakPtr<WebGraphicsContext3DSwapBuffersClient> null_client; |
595 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( | 595 scoped_ptr<WebGraphicsContext3DCommandBufferImpl> context( |
596 new WebGraphicsContext3DCommandBufferImpl(0, GURL(), null_client)); | 596 new WebGraphicsContext3DCommandBufferImpl(0, GURL(), null_client)); |
597 if (!context->Initialize(attributes)) | 597 if (!context->Initialize(attributes)) |
598 return NULL; | 598 return NULL; |
599 return context.release(); | 599 return context.release(); |
600 } | 600 } |
601 } | 601 } |
602 | 602 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( | 673 RendererWebKitPlatformSupportImpl::createPeerConnectionHandler( |
674 WebKit::WebPeerConnectionHandlerClient* client) { | 674 WebKit::WebPeerConnectionHandlerClient* client) { |
675 WebFrame* web_frame = WebFrame::frameForCurrentContext(); | 675 WebFrame* web_frame = WebFrame::frameForCurrentContext(); |
676 if (!web_frame) | 676 if (!web_frame) |
677 return NULL; | 677 return NULL; |
678 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); | 678 RenderViewImpl* render_view = RenderViewImpl::FromWebView(web_frame->view()); |
679 if (!render_view) | 679 if (!render_view) |
680 return NULL; | 680 return NULL; |
681 return render_view->CreatePeerConnectionHandler(client); | 681 return render_view->CreatePeerConnectionHandler(client); |
682 } | 682 } |
OLD | NEW |