summaryrefslogtreecommitdiffstats
path: root/chrome/browser/utility_process_host.h
diff options
context:
space:
mode:
authormirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-18 23:02:54 +0000
committermirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-18 23:02:54 +0000
commitea0c98cfa2849f95bf40238c9f476c9cebb22244 (patch)
treeec81fe0c664cb6c0adddbd5d392313e8fbb93ec5 /chrome/browser/utility_process_host.h
parent1f70f0ca51d1c61d3a775507b2b69dcdf60e77df (diff)
downloadchromium_src-ea0c98cfa2849f95bf40238c9f476c9cebb22244.zip
chromium_src-ea0c98cfa2849f95bf40238c9f476c9cebb22244.tar.gz
chromium_src-ea0c98cfa2849f95bf40238c9f476c9cebb22244.tar.bz2
First draft of web resource service; fetches data from a JSON feed
and stores it in user prefs, where it can be used by the new tab page. BUG = http://crbug.com/13363 Review URL: http://codereview.chromium.org/125052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18766 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/utility_process_host.h')
-rw-r--r--chrome/browser/utility_process_host.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/chrome/browser/utility_process_host.h b/chrome/browser/utility_process_host.h
index 03d98c8..86b7935 100644
--- a/chrome/browser/utility_process_host.h
+++ b/chrome/browser/utility_process_host.h
@@ -15,6 +15,7 @@
class CommandLine;
class DictionaryValue;
+class ListValue;
class MessageLoop;
// This class acts as the browser-side host to a utility child process. A
@@ -42,6 +43,17 @@ class UtilityProcessHost : public ChildProcessHost {
// |error_message| contains a description of the problem.
virtual void OnUnpackExtensionFailed(const std::string& error_message) {}
+ // Called when the web resource has been successfully parsed. |json_data|
+ // contains the parsed list of web resource items downloaded from the
+ // web resource server.
+ virtual void OnUnpackWebResourceSucceeded(
+ const ListValue& json_data) {}
+
+ // Called when an error occurred while parsing the resource data.
+ // |error_message| contains a description of the problem.
+ virtual void OnUnpackWebResourceFailed(
+ const std::string& error_message) {}
+
private:
friend class UtilityProcessHost;
void OnMessageReceived(const IPC::Message& message);
@@ -59,8 +71,16 @@ class UtilityProcessHost : public ChildProcessHost {
// location first.
bool StartExtensionUnpacker(const FilePath& extension);
+ // Start a process to unpack and parse a web resource from the given JSON
+ // data. Any links that need to be downloaded from the parsed data
+ // (thumbnails, etc.) will be unpacked in resource_dir.
+ // TODO(mrc): Right now, the unpacker just parses the JSON data, and
+ // doesn't do any unpacking. This should change once we finalize the
+ // web resource server format(s).
+ bool StartWebResourceUnpacker(const std::string& data);
+
private:
- // Starts the process. Returns true iff it succeeded.
+ // Starts a process. Returns true iff it succeeded.
bool StartProcess(const FilePath& exposed_dir);
// IPC messages: