diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 00:27:10 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-14 00:27:10 +0000 |
commit | e93e04e68701ef882ea86d16039e17525e41ebad (patch) | |
tree | 2b53b5ba7b4f179f9ba8369af5c70c986afd31b0 /content/common/appcache_messages.h | |
parent | 4ce47a5c70379c34dd1ba114642712308d5fb38b (diff) | |
download | chromium_src-e93e04e68701ef882ea86d16039e17525e41ebad.zip chromium_src-e93e04e68701ef882ea86d16039e17525e41ebad.tar.gz chromium_src-e93e04e68701ef882ea86d16039e17525e41ebad.tar.bz2 |
Move AppCache common code to content and split off AppCache messages into their own file. Also move WebMessagePortChannel and WebDatabaseObserverImpl to content.
TBR=michaeln
Review URL: http://codereview.chromium.org/6691002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77990 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/appcache_messages.h')
-rw-r--r-- | content/common/appcache_messages.h | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/content/common/appcache_messages.h b/content/common/appcache_messages.h new file mode 100644 index 0000000..d14ffa8 --- /dev/null +++ b/content/common/appcache_messages.h @@ -0,0 +1,137 @@ +// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Multiply-included message file, hence no include guard. + +#include "ipc/ipc_message_macros.h" +#include "webkit/appcache/appcache_interfaces.h" + +#define IPC_MESSAGE_START AppCacheMsgStart + +IPC_ENUM_TRAITS(appcache::EventID) +IPC_ENUM_TRAITS(appcache::Status) + +IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheInfo) + IPC_STRUCT_TRAITS_MEMBER(manifest_url) + IPC_STRUCT_TRAITS_MEMBER(creation_time) + IPC_STRUCT_TRAITS_MEMBER(last_update_time) + IPC_STRUCT_TRAITS_MEMBER(last_access_time) + IPC_STRUCT_TRAITS_MEMBER(cache_id) + IPC_STRUCT_TRAITS_MEMBER(status) + IPC_STRUCT_TRAITS_MEMBER(size) + IPC_STRUCT_TRAITS_MEMBER(is_complete) +IPC_STRUCT_TRAITS_END() + +IPC_STRUCT_TRAITS_BEGIN(appcache::AppCacheResourceInfo) + IPC_STRUCT_TRAITS_MEMBER(url) + IPC_STRUCT_TRAITS_MEMBER(size) + IPC_STRUCT_TRAITS_MEMBER(is_master) + IPC_STRUCT_TRAITS_MEMBER(is_manifest) + IPC_STRUCT_TRAITS_MEMBER(is_fallback) + IPC_STRUCT_TRAITS_MEMBER(is_foreign) + IPC_STRUCT_TRAITS_MEMBER(is_explicit) +IPC_STRUCT_TRAITS_END() + +// AppCache messages sent from the child process to the browser. + +// Informs the browser of a new appcache host. +IPC_MESSAGE_CONTROL1(AppCacheHostMsg_RegisterHost, + int /* host_id */) + +// Informs the browser of an appcache host being destroyed. +IPC_MESSAGE_CONTROL1(AppCacheHostMsg_UnregisterHost, + int /* host_id */) + +// Initiates the cache selection algorithm for the given host. +// This is sent prior to any subresource loads. An AppCacheMsg_CacheSelected +// message will be sent in response. +// 'host_id' indentifies a specific document or worker +// 'document_url' the url of the main resource +// 'appcache_document_was_loaded_from' the id of the appcache the main +// resource was loaded from or kNoCacheId +// 'opt_manifest_url' the manifest url specified in the <html> tag if any +IPC_MESSAGE_CONTROL4(AppCacheHostMsg_SelectCache, + int /* host_id */, + GURL /* document_url */, + int64 /* appcache_document_was_loaded_from */, + GURL /* opt_manifest_url */) + +// Initiates worker specific cache selection algorithm for the given host. +IPC_MESSAGE_CONTROL3(AppCacheHostMsg_SelectCacheForWorker, + int /* host_id */, + int /* parent_process_id */, + int /* parent_host_id */) +IPC_MESSAGE_CONTROL2(AppCacheHostMsg_SelectCacheForSharedWorker, + int /* host_id */, + int64 /* appcache_id */) + +// Informs the browser of a 'foreign' entry in an appcache. +IPC_MESSAGE_CONTROL3(AppCacheHostMsg_MarkAsForeignEntry, + int /* host_id */, + GURL /* document_url */, + int64 /* appcache_document_was_loaded_from */) + +// Returns the status of the appcache associated with host_id. +IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetStatus, + int /* host_id */, + appcache::Status) + +// Initiates an update of the appcache associated with host_id. +IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_StartUpdate, + int /* host_id */, + bool /* success */) + +// Swaps a new pending appcache, if there is one, into use for host_id. +IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_SwapCache, + int /* host_id */, + bool /* success */) + +// Gets resource list from appcache synchronously. +IPC_SYNC_MESSAGE_CONTROL1_1(AppCacheHostMsg_GetResourceList, + int /* host_id in*/, + std::vector<appcache::AppCacheResourceInfo> + /* resources out */) + + +// AppCache messages sent from the browser to the child process. + +// Notifies the renderer of the appcache that has been selected for a +// a particular host. This is sent in reply to AppCacheHostMsg_SelectCache. +IPC_MESSAGE_CONTROL2(AppCacheMsg_CacheSelected, + int /* host_id */, + appcache::AppCacheInfo) + +// Notifies the renderer of an AppCache status change. +IPC_MESSAGE_CONTROL2(AppCacheMsg_StatusChanged, + std::vector<int> /* host_ids */, + appcache::Status) + +// Notifies the renderer of an AppCache event other than the +// progress event which has a seperate message. +IPC_MESSAGE_CONTROL2(AppCacheMsg_EventRaised, + std::vector<int> /* host_ids */, + appcache::EventID) + +// Notifies the renderer of an AppCache progress event. +IPC_MESSAGE_CONTROL4(AppCacheMsg_ProgressEventRaised, + std::vector<int> /* host_ids */, + GURL /* url being processed */, + int /* total */, + int /* complete */) + +// Notifies the renderer of an AppCache error event. +IPC_MESSAGE_CONTROL2(AppCacheMsg_ErrorEventRaised, + std::vector<int> /* host_ids */, + std::string /* error_message */) + +// Notifies the renderer of an AppCache logging message. +IPC_MESSAGE_CONTROL3(AppCacheMsg_LogMessage, + int /* host_id */, + int /* log_level */, + std::string /* message */) + +// Notifies the renderer of the fact that AppCache access was blocked. +IPC_MESSAGE_CONTROL2(AppCacheMsg_ContentBlocked, + int /* host_id */, + GURL /* manifest_url */) |