[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | ||||
6 | #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | ||||
[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 7 | |
8 | #include <string> | ||||
9 | |||||
avi | 2729e44 | 2015-12-26 05:27:45 | [diff] [blame] | 10 | #include "base/macros.h" |
Gabriel Charette | 5ff87ce | 2017-05-16 18:03:45 | [diff] [blame] | 11 | #include "base/single_thread_task_runner.h" |
[email protected] | 08a932d5 | 2012-06-03 21:42:12 | [diff] [blame] | 12 | #include "content/public/test/mock_render_thread.h" |
[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 13 | |
dgn | 97dd246 | 2015-02-05 19:31:16 | [diff] [blame] | 14 | // Extends content::MockRenderThread to know about extension messages. |
[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 15 | class ChromeMockRenderThread : public content::MockRenderThread { |
16 | public: | ||||
17 | ChromeMockRenderThread(); | ||||
dcheng | b228d038 | 2014-10-21 11:05:23 | [diff] [blame] | 18 | ~ChromeMockRenderThread() override; |
[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 19 | |
[email protected] | c9a49a5 | 2013-10-25 02:20:53 | [diff] [blame] | 20 | // content::RenderThread overrides. |
thestig | 529ad8a | 2016-07-08 20:30:12 | [diff] [blame] | 21 | scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; |
[email protected] | c9a49a5 | 2013-10-25 02:20:53 | [diff] [blame] | 22 | |
[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 23 | ////////////////////////////////////////////////////////////////////////// |
24 | // The following functions are called by the test itself. | ||||
25 | |||||
thestig | 529ad8a | 2016-07-08 20:30:12 | [diff] [blame] | 26 | void set_io_task_runner( |
skyostil | 140473b | 2015-06-10 16:44:45 | [diff] [blame] | 27 | const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
[email protected] | c9a49a5 | 2013-10-25 02:20:53 | [diff] [blame] | 28 | |
ananta | 5fc8d8d | 2016-11-09 01:41:46 | [diff] [blame] | 29 | protected: |
skyostil | 140473b | 2015-06-10 16:44:45 | [diff] [blame] | 30 | scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
[email protected] | c9a49a5 | 2013-10-25 02:20:53 | [diff] [blame] | 31 | |
[email protected] | 1e54c1c | 2013-08-12 17:16:05 | [diff] [blame] | 32 | DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread); |
[email protected] | c6d068ff | 2011-10-14 17:28:23 | [diff] [blame] | 33 | }; |
34 | |||||
35 | #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |