diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 23:29:48 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-14 23:29:48 +0000 |
commit | ac381f190519f153566503e5cba87e310c1a3f96 (patch) | |
tree | 4fa928efb7f8964738e06d2de5b71f33ffcebca4 /chrome/utility | |
parent | 4e3ce3ba829b7b0251948538ff08010c312a8ec0 (diff) | |
download | chromium_src-ac381f190519f153566503e5cba87e310c1a3f96.zip chromium_src-ac381f190519f153566503e5cba87e310c1a3f96.tar.gz chromium_src-ac381f190519f153566503e5cba87e310c1a3f96.tar.bz2 |
Create content::UtilityThread interface and make chrome code use that. This interface is implemented
by the UtilityThreadImpl class in content\utility\utility_thread_impl.cc/.h which are renamed incarnations
of the content\utility\utility_thread.cc/.h files.
Changes as part of creating a content API.
BUG=98716
TEST=No change in functionality.
Review URL: http://codereview.chromium.org/8276026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105610 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/utility')
-rw-r--r-- | chrome/utility/DEPS | 1 | ||||
-rw-r--r-- | chrome/utility/chrome_content_utility_client.cc | 24 |
2 files changed, 12 insertions, 13 deletions
diff --git a/chrome/utility/DEPS b/chrome/utility/DEPS index 4cc342b..87d7ba5 100644 --- a/chrome/utility/DEPS +++ b/chrome/utility/DEPS @@ -1,6 +1,5 @@ include_rules = [ "+chrome/browser", # For out of process profile import. "+content/public/utility", - "+content/utility", "+webkit/glue", ] diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc index 256fb9b..d10bfb1 100644 --- a/chrome/utility/chrome_content_utility_client.cc +++ b/chrome/utility/chrome_content_utility_client.cc @@ -17,7 +17,7 @@ #include "chrome/common/extensions/extension_unpacker.h" #include "chrome/common/extensions/update_manifest.h" #include "chrome/common/web_resource/web_resource_unpacker.h" -#include "content/utility/utility_thread.h" +#include "content/public/utility/utility_thread.h" #include "printing/backend/print_backend.h" #include "printing/page_range.h" #include "third_party/skia/include/core/SkBitmap.h" @@ -91,7 +91,7 @@ bool ChromeContentUtilityClient::OnMessageReceived( } bool ChromeContentUtilityClient::Send(IPC::Message* message) { - return UtilityThread::current()->Send(message); + return content::UtilityThread::Get()->Send(message); } void ChromeContentUtilityClient::OnUnpackExtension( @@ -106,7 +106,7 @@ void ChromeContentUtilityClient::OnUnpackExtension( unpacker.error_message())); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } void ChromeContentUtilityClient::OnUnpackWebResource( @@ -123,7 +123,7 @@ void ChromeContentUtilityClient::OnUnpackWebResource( unpacker.error_message())); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } void ChromeContentUtilityClient::OnParseUpdateManifest(const std::string& xml) { @@ -135,7 +135,7 @@ void ChromeContentUtilityClient::OnParseUpdateManifest(const std::string& xml) { Send(new ChromeUtilityHostMsg_ParseUpdateManifest_Succeeded( manifest.results())); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } void ChromeContentUtilityClient::OnDecodeImage( @@ -148,7 +148,7 @@ void ChromeContentUtilityClient::OnDecodeImage( } else { Send(new ChromeUtilityHostMsg_DecodeImage_Succeeded(decoded_image)); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } void ChromeContentUtilityClient::OnDecodeImageBase64( @@ -191,7 +191,7 @@ void ChromeContentUtilityClient::OnRenderPDFPagesToMetafile( if (!succeeded) { Send(new ChromeUtilityHostMsg_RenderPDFPagesToMetafile_Failed()); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } #if defined(OS_WIN) @@ -234,10 +234,10 @@ DWORD WINAPI UtilityProcess_GetFontDataPatch( LOGFONT logfont; if (GetObject(font, sizeof(LOGFONT), &logfont)) { std::vector<char> font_data; - if (UtilityThread::current()->Send( + if (content::UtilityThread::Get()->Send( new ChildProcessHostMsg_PreCacheFont(logfont))) { rv = GetFontData(hdc, table, offset, buffer, length); - UtilityThread::current()->Send( + content::UtilityThread::Get()->Send( new ChildProcessHostMsg_ReleaseCachedFonts()); } } @@ -351,7 +351,7 @@ void ChromeContentUtilityClient::OnParseJSON(const std::string& json) { } else { Send(new ChromeUtilityHostMsg_ParseJSON_Failed(error)); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } void ChromeContentUtilityClient::OnGetPrinterCapsAndDefaults( @@ -366,7 +366,7 @@ void ChromeContentUtilityClient::OnGetPrinterCapsAndDefaults( Send(new ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed( printer_name)); } - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } void ChromeContentUtilityClient::OnImportStart( @@ -417,7 +417,7 @@ void ChromeContentUtilityClient::ImporterCleanup() { importer_ = NULL; bridge_ = NULL; import_thread_.reset(); - UtilityThread::current()->ReleaseProcessIfNeeded(); + content::UtilityThread::Get()->ReleaseProcessIfNeeded(); } } // namespace chrome |