diff options
author | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 22:20:17 +0000 |
---|---|---|
committer | asargent@chromium.org <asargent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-05 22:20:17 +0000 |
commit | 5349ac6df87c8ddaa04f398375b571430e7c0372 (patch) | |
tree | 2415e4029ea4dd09b0ab11e4a8da8de5cec2500a /chrome/browser/utility_process_host.h | |
parent | 4388ee404a5df94fc6bf517638989e8db22fd4fa (diff) | |
download | chromium_src-5349ac6df87c8ddaa04f398375b571430e7c0372.zip chromium_src-5349ac6df87c8ddaa04f398375b571430e7c0372.tar.gz chromium_src-5349ac6df87c8ddaa04f398375b571430e7c0372.tar.bz2 |
Add a webstore install method that lets us prompt the user before downloading.
A while back we decided to minimize friction by showing extension/app
permissions inline in the webstore, and let installs done via the private
webstore API skip the regular extension installation confirmation that happens
after downloading and unpacking the .crx file. We've reconsidered this and are
now adding a new private install method that lets us go back to having the
client display the confirmation dialog, but do it before downloading the .crx
file. The webstore just needs to pass the manifest and icon, and then after
downloading the .crx we make sure the unpacked extension's manifest matches
what we had prompted with.
BUG=75821
TEST=(Existing tests should pass; new functionality requires chrome web store
server side changes to test)
Review URL: http://codereview.chromium.org/6794010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80536 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/utility_process_host.h')
-rw-r--r-- | chrome/browser/utility_process_host.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/chrome/browser/utility_process_host.h b/chrome/browser/utility_process_host.h index f1aea70..fa8a9c6 100644 --- a/chrome/browser/utility_process_host.h +++ b/chrome/browser/utility_process_host.h @@ -18,6 +18,7 @@ class DictionaryValue; class IndexedDBKey; +class ListValue; class SerializedScriptValue; class SkBitmap; @@ -95,6 +96,13 @@ class UtilityProcessHost : public BrowserChildProcessHost { virtual void OnInjectIDBKeyFinished( const SerializedScriptValue& new_value) {} + // Called when we're finished parsing a JSON string. Note that if parsing + // was successful, the result Value is contained in the first element of + // |wrapper| (we do this to get around a trickiness with passing a Value + // by const reference via our IPC system). + virtual void OnJSONParseSucceeded(const ListValue& wrapper) {} + virtual void OnJSONParseFailed(const std::string& error_message) {} + protected: friend class base::RefCountedThreadSafe<Client>; @@ -129,8 +137,11 @@ class UtilityProcessHost : public BrowserChildProcessHost { // Start parsing an extensions auto-update manifest xml file. bool StartUpdateManifestParse(const std::string& xml); - // Start image decoding. + // Start image decoding. The image can be any format WebCore understands. + // Results are reported to either OnDecodeImageSuceeded() or + // OnDecodeImageFailed(). bool StartImageDecoding(const std::vector<unsigned char>& encoded_data); + bool StartImageDecodingBase64(const std::string& base64_encoded_data); // Starts extracting |key_path| from |serialized_values|, and replies with the // corresponding IndexedDBKeys via OnIDBKeysFromValuesAndKeyPathSucceeded. @@ -144,6 +155,10 @@ class UtilityProcessHost : public BrowserChildProcessHost { const SerializedScriptValue& value, const string16& key_path); + // Starts parsing a JSON string into a Value object. The result is reported + // to the client via OnJSONParseSucceeded or OnJSONParseFailed. + bool StartJSONParsing(const std::string& json); + // Starts utility process in batch mode. Caller must call EndBatchMode() // to finish the utility process. bool StartBatchMode(); |