OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2008 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_MOCK_RENDER_PROCESS_H_ |
| 6 #define CHROME_RENDERER_MOCK_RENDER_PROCESS_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "chrome/common/child_process.h" |
| 11 |
| 12 // This class is a trivial mock of the child process singleton. It is necessary |
| 13 // so we don't trip DCHECKs in ChildProcess::ReleaseProcess() when destroying |
| 14 // a render widget instance. |
| 15 class MockProcess : public ChildProcess { |
| 16 public: |
| 17 explicit MockProcess(const std::wstring& channel_name) {} |
| 18 static void GlobalInit() { |
| 19 ChildProcessFactory<MockProcess> factory; |
| 20 ChildProcess::GlobalInit(L"dummy", &factory); |
| 21 } |
| 22 }; |
| 23 |
| 24 #endif // CHROME_RENDERER_MOCK_RENDER_PROCESS_H_ |
| 25 |
OLD | NEW |