summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/chrome_plugin_host.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-20 05:23:36 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-20 05:23:36 +0000
commit514e711ea07b6a1aef47ebf20250a37bd632402c (patch)
tree632f5e8902cc4231e9c14d0ad28035d63a0c964d /chrome/renderer/chrome_plugin_host.cc
parent4acbad918766b81f1da3f10e2ae8aa2b10bb0593 (diff)
downloadchromium_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/chrome_plugin_host.cc')
-rw-r--r--chrome/renderer/chrome_plugin_host.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/renderer/chrome_plugin_host.cc b/chrome/renderer/chrome_plugin_host.cc
index 6f793b7..9d437c0 100644
--- a/chrome/renderer/chrome_plugin_host.cc
+++ b/chrome/renderer/chrome_plugin_host.cc
@@ -320,7 +320,7 @@ int STDCALL CPB_GetBrowsingContextInfo(
return sizeof(char*);
std::wstring wretval;
- if (!g_render_thread->Send(new ViewHostMsg_GetDataDir(&wretval)))
+ if (!RenderThread::current()->Send(new ViewHostMsg_GetDataDir(&wretval)))
return CPERR_FAILURE;
file_util::AppendToPath(&wretval, chrome::kChromePluginDataDirname);
*static_cast<char**>(buf) = CPB_StringDup(CPB_Alloc, WideToUTF8(wretval));
@@ -491,8 +491,8 @@ CPError STDCALL CPB_SendMessage(CPID id, const void *data, uint32 data_len) {
const uint8* data_ptr = static_cast<const uint8*>(data);
std::vector<uint8> v(data_ptr, data_ptr + data_len);
- if (!g_render_thread->Send(new ViewHostMsg_PluginMessage(plugin->filename(),
- v))) {
+ if (!RenderThread::current()->Send(
+ new ViewHostMsg_PluginMessage(plugin->filename(), v))) {
return CPERR_FAILURE;
}
return CPERR_SUCCESS;
@@ -507,7 +507,7 @@ CPError STDCALL CPB_SendSyncMessage(CPID id, const void *data, uint32 data_len,
const uint8* data_ptr = static_cast<const uint8*>(data);
std::vector<uint8> v(data_ptr, data_ptr + data_len);
std::vector<uint8> r;
- if (!g_render_thread->Send(new ViewHostMsg_PluginSyncMessage(
+ if (!RenderThread::current()->Send(new ViewHostMsg_PluginSyncMessage(
plugin->filename(), v, &r))) {
return CPERR_FAILURE;
}