| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |
| 6 #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/single_thread_task_runner.h" |
| 11 #include "content/public/test/mock_render_thread.h" | 12 #include "content/public/test/mock_render_thread.h" |
| 12 | 13 |
| 13 // Extends content::MockRenderThread to know about extension messages. | 14 // Extends content::MockRenderThread to know about extension messages. |
| 14 class ChromeMockRenderThread : public content::MockRenderThread { | 15 class ChromeMockRenderThread : public content::MockRenderThread { |
| 15 public: | 16 public: |
| 16 ChromeMockRenderThread(); | 17 ChromeMockRenderThread(); |
| 17 ~ChromeMockRenderThread() override; | 18 ~ChromeMockRenderThread() override; |
| 18 | 19 |
| 19 // content::RenderThread overrides. | 20 // content::RenderThread overrides. |
| 20 scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; | 21 scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() override; |
| 21 | 22 |
| 22 ////////////////////////////////////////////////////////////////////////// | 23 ////////////////////////////////////////////////////////////////////////// |
| 23 // The following functions are called by the test itself. | 24 // The following functions are called by the test itself. |
| 24 | 25 |
| 25 void set_io_task_runner( | 26 void set_io_task_runner( |
| 26 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); | 27 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner); |
| 27 | 28 |
| 28 protected: | 29 protected: |
| 29 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 30 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 30 | 31 |
| 31 DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread); | 32 DISALLOW_COPY_AND_ASSIGN(ChromeMockRenderThread); |
| 32 }; | 33 }; |
| 33 | 34 |
| 34 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ | 35 #endif // CHROME_RENDERER_CHROME_MOCK_RENDER_THREAD_H_ |
| OLD | NEW |