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

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

Issue 12377029: Get rid of WebLayerTreeViewClient references in WebLayerTreeViewImplForTesting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 new WebGraphicsContext3DInProcessCommandBufferImpl()); 513 new WebGraphicsContext3DInProcessCommandBufferImpl());
514 if (!context->Initialize(attributes, NULL)) 514 if (!context->Initialize(attributes, NULL))
515 return NULL; 515 return NULL;
516 return context.release(); 516 return context.release();
517 } 517 }
518 } 518 }
519 NOTREACHED(); 519 NOTREACHED();
520 return NULL; 520 return NULL;
521 } 521 }
522 522
523 template <typename Client>
524 static WebKit::WebLayerTreeView* CreateLayerTreeView( 523 static WebKit::WebLayerTreeView* CreateLayerTreeView(
525 WebKit::WebLayerTreeViewImplForTesting::RenderingType type, 524 WebKit::WebLayerTreeViewImplForTesting::RenderingType type,
526 Client* client) { 525 DRTLayerTreeViewClient* client) {
527 scoped_ptr<WebKit::WebLayerTreeViewImplForTesting> view( 526 scoped_ptr<WebKit::WebLayerTreeViewImplForTesting> view(
528 new WebKit::WebLayerTreeViewImplForTesting(type, client)); 527 new WebKit::WebLayerTreeViewImplForTesting(type, client));
529 528
530 scoped_ptr<cc::Thread> compositor_thread; 529 scoped_ptr<cc::Thread> compositor_thread;
531 530
532 webkit::WebCompositorSupportImpl* compositor_support_impl = 531 webkit::WebCompositorSupportImpl* compositor_support_impl =
533 test_environment->webkit_platform_support()->compositor_support_impl(); 532 test_environment->webkit_platform_support()->compositor_support_impl();
534 if (compositor_support_impl->compositor_thread_message_loop_proxy()) 533 if (compositor_support_impl->compositor_thread_message_loop_proxy())
535 compositor_thread = cc::ThreadImpl::createForDifferentThread( 534 compositor_thread = cc::ThreadImpl::createForDifferentThread(
536 compositor_support_impl->compositor_thread_message_loop_proxy()); 535 compositor_support_impl->compositor_thread_message_loop_proxy());
537 536
538 if (!view->initialize(compositor_thread.Pass())) 537 if (!view->initialize(compositor_thread.Pass()))
539 return NULL; 538 return NULL;
540 return view.release(); 539 return view.release();
541 } 540 }
542 541
543 WebKit::WebLayerTreeView* CreateLayerTreeViewSoftware( 542 WebKit::WebLayerTreeView* CreateLayerTreeViewSoftware(
544 WebKit::WebLayerTreeViewClient* client) {
545 return CreateLayerTreeView(
546 WebKit::WebLayerTreeViewImplForTesting::SOFTWARE_CONTEXT, client);
547 }
548
549 WebKit::WebLayerTreeView* CreateLayerTreeView3d(
550 WebKit::WebLayerTreeViewClient* client) {
551 return CreateLayerTreeView(
552 WebKit::WebLayerTreeViewImplForTesting::MESA_CONTEXT, client);
553 }
554
555 WebKit::WebLayerTreeView* CreateLayerTreeViewSoftware(
556 DRTLayerTreeViewClient* client) { 543 DRTLayerTreeViewClient* client) {
557 return CreateLayerTreeView( 544 return CreateLayerTreeView(
558 WebKit::WebLayerTreeViewImplForTesting::SOFTWARE_CONTEXT, client); 545 WebKit::WebLayerTreeViewImplForTesting::SOFTWARE_CONTEXT, client);
559 } 546 }
560 547
561 WebKit::WebLayerTreeView* CreateLayerTreeView3d( 548 WebKit::WebLayerTreeView* CreateLayerTreeView3d(
562 DRTLayerTreeViewClient* client) { 549 DRTLayerTreeViewClient* client) {
563 return CreateLayerTreeView( 550 return CreateLayerTreeView(
564 WebKit::WebLayerTreeViewImplForTesting::MESA_CONTEXT, client); 551 WebKit::WebLayerTreeViewImplForTesting::MESA_CONTEXT, client);
565 } 552 }
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 // Logging 916 // Logging
930 void EnableWebCoreLogChannels(const std::string& channels) { 917 void EnableWebCoreLogChannels(const std::string& channels) {
931 webkit_glue::EnableWebCoreLogChannels(channels); 918 webkit_glue::EnableWebCoreLogChannels(channels);
932 } 919 }
933 920
934 void SetGamepadData(const WebKit::WebGamepads& pads) { 921 void SetGamepadData(const WebKit::WebGamepads& pads) {
935 test_environment->webkit_platform_support()->setGamepadData(pads); 922 test_environment->webkit_platform_support()->setGamepadData(pads);
936 } 923 }
937 924
938 } // namespace webkit_support 925 } // namespace webkit_support
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698