| 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 10 matching lines...) Expand all Loading... |
| 21 #include "base/message_loop.h" | 21 #include "base/message_loop.h" |
| 22 #include "base/path_service.h" | 22 #include "base/path_service.h" |
| 23 #include "base/process_util.h" | 23 #include "base/process_util.h" |
| 24 #include "base/run_loop.h" | 24 #include "base/run_loop.h" |
| 25 #include "base/strings/string_piece.h" | 25 #include "base/strings/string_piece.h" |
| 26 #include "base/strings/string_util.h" | 26 #include "base/strings/string_util.h" |
| 27 #include "base/strings/stringprintf.h" | 27 #include "base/strings/stringprintf.h" |
| 28 #include "base/strings/sys_string_conversions.h" | 28 #include "base/strings/sys_string_conversions.h" |
| 29 #include "base/strings/utf_string_conversions.h" | 29 #include "base/strings/utf_string_conversions.h" |
| 30 #include "base/time.h" | 30 #include "base/time.h" |
| 31 #include "cc/base/thread_impl.h" | |
| 32 #include "googleurl/src/url_util.h" | 31 #include "googleurl/src/url_util.h" |
| 33 #include "grit/webkit_chromium_resources.h" | 32 #include "grit/webkit_chromium_resources.h" |
| 34 #include "media/base/filter_collection.h" | 33 #include "media/base/filter_collection.h" |
| 35 #include "media/base/media_log.h" | 34 #include "media/base/media_log.h" |
| 36 #include "net/base/escape.h" | 35 #include "net/base/escape.h" |
| 37 #include "net/base/net_errors.h" | 36 #include "net/base/net_errors.h" |
| 38 #include "net/base/net_util.h" | 37 #include "net/base/net_util.h" |
| 39 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
| 40 #include "third_party/WebKit/public/web/WebCache.h" | 39 #include "third_party/WebKit/public/web/WebCache.h" |
| 41 #include "third_party/WebKit/public/web/WebFileSystemCallbacks.h" | 40 #include "third_party/WebKit/public/web/WebFileSystemCallbacks.h" |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 break; | 456 break; |
| 458 default: | 457 default: |
| 459 NOTREACHED(); | 458 NOTREACHED(); |
| 460 } | 459 } |
| 461 } | 460 } |
| 462 | 461 |
| 463 WebKit::WebLayerTreeView* CreateLayerTreeView( | 462 WebKit::WebLayerTreeView* CreateLayerTreeView( |
| 464 LayerTreeViewType type, | 463 LayerTreeViewType type, |
| 465 DRTLayerTreeViewClient* client, | 464 DRTLayerTreeViewClient* client, |
| 466 WebKit::WebThread* thread) { | 465 WebKit::WebThread* thread) { |
| 467 scoped_ptr<cc::Thread> compositor_thread; | 466 DCHECK(!thread); |
| 468 if (thread) | |
| 469 compositor_thread = cc::ThreadImpl::CreateForDifferentThread( | |
| 470 static_cast<webkit_glue::WebThreadImpl*>(thread)-> | |
| 471 message_loop()->message_loop_proxy()); | |
| 472 | 467 |
| 473 scoped_ptr<webkit::WebLayerTreeViewImplForTesting> view( | 468 scoped_ptr<webkit::WebLayerTreeViewImplForTesting> view( |
| 474 new webkit::WebLayerTreeViewImplForTesting(type, client)); | 469 new webkit::WebLayerTreeViewImplForTesting(type, client)); |
| 475 | 470 |
| 476 if (!view->Initialize(compositor_thread.Pass())) | 471 if (!view->Initialize()) |
| 477 return NULL; | 472 return NULL; |
| 478 return view.release(); | 473 return view.release(); |
| 479 } | 474 } |
| 480 | 475 |
| 481 void SetThreadedCompositorEnabled(bool enabled) { | 476 void SetThreadedCompositorEnabled(bool enabled) { |
| 482 test_environment->webkit_platform_support()-> | 477 test_environment->webkit_platform_support()-> |
| 483 set_threaded_compositing_enabled(enabled); | 478 set_threaded_compositing_enabled(enabled); |
| 484 } | 479 } |
| 485 | 480 |
| 486 void RegisterMockedURL(const WebKit::WebURL& url, | 481 void RegisterMockedURL(const WebKit::WebURL& url, |
| (...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 // Logging | 847 // Logging |
| 853 void EnableWebCoreLogChannels(const std::string& channels) { | 848 void EnableWebCoreLogChannels(const std::string& channels) { |
| 854 webkit_glue::EnableWebCoreLogChannels(channels); | 849 webkit_glue::EnableWebCoreLogChannels(channels); |
| 855 } | 850 } |
| 856 | 851 |
| 857 void SetGamepadData(const WebKit::WebGamepads& pads) { | 852 void SetGamepadData(const WebKit::WebGamepads& pads) { |
| 858 test_environment->webkit_platform_support()->setGamepadData(pads); | 853 test_environment->webkit_platform_support()->setGamepadData(pads); |
| 859 } | 854 } |
| 860 | 855 |
| 861 } // namespace webkit_support | 856 } // namespace webkit_support |
| OLD | NEW |