diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 05:23:36 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-20 05:23:36 +0000 |
commit | 514e711ea07b6a1aef47ebf20250a37bd632402c (patch) | |
tree | 632f5e8902cc4231e9c14d0ad28035d63a0c964d /chrome/renderer/mock_render_process.h | |
parent | 4acbad918766b81f1da3f10e2ae8aa2b10bb0593 (diff) | |
download | chromium_src-514e711ea07b6a1aef47ebf20250a37bd632402c.zip chromium_src-514e711ea07b6a1aef47ebf20250a37bd632402c.tar.gz chromium_src-514e711ea07b6a1aef47ebf20250a37bd632402c.tar.bz2 |
Refactor code from RenderThread and PluginThread and move it to ChildThread. ChildProcess now owns the ChildThread, which removes duplicate code and simplifies things.
Clean up ChildProcess, there really was no need for all the templates and statics in it and its subclasses.
Review URL: http://codereview.chromium.org/21502
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/mock_render_process.h')
-rw-r--r-- | chrome/renderer/mock_render_process.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome/renderer/mock_render_process.h b/chrome/renderer/mock_render_process.h index d7bd178..629967f 100644 --- a/chrome/renderer/mock_render_process.h +++ b/chrome/renderer/mock_render_process.h @@ -5,21 +5,17 @@ #ifndef CHROME_RENDERER_MOCK_RENDER_PROCESS_H_ #define CHROME_RENDERER_MOCK_RENDER_PROCESS_H_ -#include <string> - #include "chrome/common/child_process.h" +class ChildThread; + // This class is a trivial mock of the child process singleton. It is necessary // so we don't trip DCHECKs in ChildProcess::ReleaseProcess() when destroying // a render widget instance. class MockProcess : public ChildProcess { public: - explicit MockProcess(const std::wstring& channel_name) {} - static void GlobalInit() { - ChildProcessFactory<MockProcess> factory; - ChildProcess::GlobalInit(L"dummy", &factory); - } + explicit MockProcess() : ChildProcess(NULL) {} + explicit MockProcess(ChildThread* thread) : ChildProcess(thread) {} }; #endif // CHROME_RENDERER_MOCK_RENDER_PROCESS_H_ - |