OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/test_blink_web_unit_test_support.h" | 5 #include "content/test/test_blink_web_unit_test_support.h" |
6 | 6 |
7 #include "base/feature_list.h" | 7 #include "base/feature_list.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
15 #include "base/strings/utf_string_conversions.h" | 15 #include "base/strings/utf_string_conversions.h" |
16 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
17 #include "base/threading/platform_thread.h" | 17 #include "base/threading/platform_thread.h" |
18 #include "base/threading/thread_id_name_manager.h" | |
18 #include "build/build_config.h" | 19 #include "build/build_config.h" |
19 #include "cc/blink/web_layer_impl.h" | 20 #include "cc/blink/web_layer_impl.h" |
20 #include "cc/trees/layer_tree_settings.h" | 21 #include "cc/trees/layer_tree_settings.h" |
21 #include "components/scheduler/renderer/renderer_scheduler_impl.h" | 22 #include "components/scheduler/renderer/renderer_scheduler_impl.h" |
22 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" | 23 #include "components/scheduler/renderer/webthread_impl_for_renderer_scheduler.h" |
23 #include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tes ts.h" | 24 #include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tes ts.h" |
24 #include "content/child/web_url_loader_impl.h" | 25 #include "content/child/web_url_loader_impl.h" |
25 #include "content/test/mock_webclipboard_impl.h" | 26 #include "content/test/mock_webclipboard_impl.h" |
26 #include "content/test/web_gesture_curve_mock.h" | 27 #include "content/test/web_gesture_curve_mock.h" |
27 #include "media/base/media.h" | 28 #include "media/base/media.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
65 const base::Closure& task, | 66 const base::Closure& task, |
66 base::TimeDelta delay) override { | 67 base::TimeDelta delay) override { |
67 // Drop the delayed task. | 68 // Drop the delayed task. |
68 return false; | 69 return false; |
69 } | 70 } |
70 | 71 |
71 bool RunsTasksOnCurrentThread() const override { | 72 bool RunsTasksOnCurrentThread() const override { |
72 return thread_id_ == base::PlatformThread::CurrentId(); | 73 return thread_id_ == base::PlatformThread::CurrentId(); |
73 } | 74 } |
74 | 75 |
76 std::string MessageLoopTaskRunner::GetThreadName() const override { | |
gab
2016/05/12 15:50:57
Don't think you need MessageLoopTaskRunner:: here
| |
77 return ThreadIdNameManager::GetInstance()->GetName(thread_id_); | |
78 } | |
79 | |
75 protected: | 80 protected: |
76 ~DummyTaskRunner() override {} | 81 ~DummyTaskRunner() override {} |
77 | 82 |
78 base::PlatformThreadId thread_id_; | 83 base::PlatformThreadId thread_id_; |
79 | 84 |
80 DISALLOW_COPY_AND_ASSIGN(DummyTaskRunner); | 85 DISALLOW_COPY_AND_ASSIGN(DummyTaskRunner); |
81 }; | 86 }; |
82 | 87 |
83 } // namespace | 88 } // namespace |
84 | 89 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 return BlinkPlatformImpl::currentThread(); | 297 return BlinkPlatformImpl::currentThread(); |
293 } | 298 } |
294 | 299 |
295 void TestBlinkWebUnitTestSupport::getPluginList( | 300 void TestBlinkWebUnitTestSupport::getPluginList( |
296 bool refresh, blink::WebPluginListBuilder* builder) { | 301 bool refresh, blink::WebPluginListBuilder* builder) { |
297 builder->addPlugin("pdf", "pdf", "pdf-files"); | 302 builder->addPlugin("pdf", "pdf", "pdf-files"); |
298 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 303 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
299 } | 304 } |
300 | 305 |
301 } // namespace content | 306 } // namespace content |
OLD | NEW |