diff options
author | avayvod@google.com <avayvod@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 18:31:22 +0000 |
---|---|---|
committer | avayvod@google.com <avayvod@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-15 18:31:22 +0000 |
commit | 79c2b56bcad7b23ccc25d2bc934887ea080b7a9d (patch) | |
tree | efc45fa2d3e5250849972bf90510f39efc7ec93d /chrome/browser/utility_process_host.cc | |
parent | 26cfaf5d657b92f5f94eccc0a0b51c28caccbc5a (diff) | |
download | chromium_src-79c2b56bcad7b23ccc25d2bc934887ea080b7a9d.zip chromium_src-79c2b56bcad7b23ccc25d2bc934887ea080b7a9d.tar.gz chromium_src-79c2b56bcad7b23ccc25d2bc934887ea080b7a9d.tar.bz2 |
Added decoding of any supported image format into vector of chars.
This is used for decoding user's image downloaded from Google Profile
in sandboxed process upon user's login to Chromium OS.
This required adding dependency on webkit/glue/ in chrome/utility. Approved
by Brett.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/1646004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44675 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/utility_process_host.cc')
-rw-r--r-- | chrome/browser/utility_process_host.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/browser/utility_process_host.cc b/chrome/browser/utility_process_host.cc index 1766b7e..2f7ce5d 100644 --- a/chrome/browser/utility_process_host.cc +++ b/chrome/browser/utility_process_host.cc @@ -51,6 +51,15 @@ bool UtilityProcessHost::StartUpdateManifestParse(const std::string& xml) { return true; } +bool UtilityProcessHost::StartImageDecoding( + const std::vector<unsigned char>& encoded_data) { + if (!StartProcess(FilePath())) + return false; + + Send(new UtilityMsg_DecodeImage(encoded_data)); + return true; +} + FilePath UtilityProcessHost::GetUtilityProcessCmd() { return GetChildPath(true); } @@ -146,5 +155,9 @@ void UtilityProcessHost::Client::OnMessageReceived( Client::OnParseUpdateManifestSucceeded) IPC_MESSAGE_HANDLER(UtilityHostMsg_ParseUpdateManifest_Failed, Client::OnParseUpdateManifestFailed) + IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Succeeded, + Client::OnDecodeImageSucceeded) + IPC_MESSAGE_HANDLER(UtilityHostMsg_DecodeImage_Failed, + Client::OnDecodeImageFailed) IPC_END_MESSAGE_MAP_EX() } |