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 "webkit/support/webkit_support.h" | 5 #include "webkit/support/webkit_support.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/base64.h" | 8 #include "base/base64.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 362 |
363 void SetGraphicsContext3DImplementation(GraphicsContext3DImplementation impl) { | 363 void SetGraphicsContext3DImplementation(GraphicsContext3DImplementation impl) { |
364 g_graphics_context_3d_implementation = impl; | 364 g_graphics_context_3d_implementation = impl; |
365 } | 365 } |
366 | 366 |
367 GraphicsContext3DImplementation GetGraphicsContext3DImplementation() { | 367 GraphicsContext3DImplementation GetGraphicsContext3DImplementation() { |
368 return g_graphics_context_3d_implementation; | 368 return g_graphics_context_3d_implementation; |
369 } | 369 } |
370 | 370 |
371 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( | 371 WebKit::WebGraphicsContext3D* CreateGraphicsContext3D( |
372 WebKit::WebGraphicsContext3D::Attributes attributes, | 372 const WebKit::WebGraphicsContext3D::Attributes& attributes, |
373 WebKit::WebView* web_view, | 373 WebKit::WebView* web_view, |
374 bool direct) { | 374 bool direct) { |
375 scoped_ptr<WebKit::WebGraphicsContext3D> context; | 375 scoped_ptr<WebKit::WebGraphicsContext3D> context; |
376 switch (webkit_support::GetGraphicsContext3DImplementation()) { | 376 switch (webkit_support::GetGraphicsContext3DImplementation()) { |
377 case webkit_support::IN_PROCESS: | 377 case webkit_support::IN_PROCESS: |
378 context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl( | 378 context.reset(new webkit::gpu::WebGraphicsContext3DInProcessImpl( |
379 gfx::kNullPluginWindow, NULL)); | 379 gfx::kNullPluginWindow, NULL)); |
380 break; | 380 break; |
381 case webkit_support::IN_PROCESS_COMMAND_BUFFER: | 381 case webkit_support::IN_PROCESS_COMMAND_BUFFER: |
382 context.reset( | 382 context.reset( |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 // Logging | 668 // Logging |
669 void EnableWebCoreLogChannels(const std::string& channels) { | 669 void EnableWebCoreLogChannels(const std::string& channels) { |
670 webkit_glue::EnableWebCoreLogChannels(channels); | 670 webkit_glue::EnableWebCoreLogChannels(channels); |
671 } | 671 } |
672 | 672 |
673 void SetGamepadData(const WebKit::WebGamepads& pads) { | 673 void SetGamepadData(const WebKit::WebGamepads& pads) { |
674 test_environment->webkit_platform_support()->setGamepadData(pads); | 674 test_environment->webkit_platform_support()->setGamepadData(pads); |
675 } | 675 } |
676 | 676 |
677 } // namespace webkit_support | 677 } // namespace webkit_support |
OLD | NEW |