Reland "Be explicit about forcing TouchSelectionController updates"
[chromium-blink-merge.git] / extensions / common / extension_utility_messages.h
blob35e37a35f330b14895ebc798b529c2ed4d94141c
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Multiply-included message file, so no include guard.
7 #include <string>
9 #include "extensions/common/update_manifest.h"
10 #include "ipc/ipc_message_macros.h"
11 #include "third_party/skia/include/core/SkBitmap.h"
12 #include "ui/gfx/ipc/gfx_param_traits.h"
14 #define IPC_MESSAGE_START ExtensionUtilityMsgStart
16 #ifndef EXTENSIONS_COMMON_EXTENSION_UTILITY_MESSAGES_H_
17 #define EXTENSIONS_COMMON_EXTENSION_UTILITY_MESSAGES_H_
19 typedef std::vector<Tuple<SkBitmap, base::FilePath>> DecodedImages;
21 #endif // EXTENSIONS_COMMON_EXTENSION_UTILITY_MESSAGES_H_
23 IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Result)
24 IPC_STRUCT_TRAITS_MEMBER(extension_id)
25 IPC_STRUCT_TRAITS_MEMBER(version)
26 IPC_STRUCT_TRAITS_MEMBER(browser_min_version)
27 IPC_STRUCT_TRAITS_MEMBER(package_hash)
28 IPC_STRUCT_TRAITS_MEMBER(crx_url)
29 IPC_STRUCT_TRAITS_END()
31 IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Results)
32 IPC_STRUCT_TRAITS_MEMBER(list)
33 IPC_STRUCT_TRAITS_MEMBER(daystart_elapsed_seconds)
34 IPC_STRUCT_TRAITS_END()
36 //------------------------------------------------------------------------------
37 // Utility process messages:
38 // These are messages from the browser to the utility process.
40 // Tell the utility process to parse the given xml document.
41 IPC_MESSAGE_CONTROL1(ExtensionUtilityMsg_ParseUpdateManifest,
42 std::string /* xml document contents */)
44 // Tells the utility process to unpack the given extension file in its
45 // directory and verify that it is valid.
46 IPC_MESSAGE_CONTROL4(ChromeUtilityMsg_UnpackExtension,
47 base::FilePath /* extension_filename */,
48 std::string /* extension_id */,
49 int /* Manifest::Location */,
50 int /* InitFromValue flags */)
52 //------------------------------------------------------------------------------
53 // Utility process host messages:
54 // These are messages from the utility process to the browser.
56 // Reply when the utility process has succeeded in parsing an update manifest
57 // xml document.
58 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_ParseUpdateManifest_Succeeded,
59 UpdateManifest::Results /* updates */)
61 // Reply when an error occurred parsing the update manifest. |error_message|
62 // is a description of what went wrong suitable for logging.
63 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_ParseUpdateManifest_Failed,
64 std::string /* error_message, if any */)
66 // Reply when the utility process is done unpacking an extension. |manifest|
67 // is the parsed manifest.json file.
68 // The unpacker should also have written out files containing the decoded
69 // images and message catalogs from the extension. The data is written into a
70 // DecodedImages struct into a file named kDecodedImagesFilename in the
71 // directory that was passed in. This is done because the data is too large to
72 // pass over IPC.
73 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackExtension_Succeeded,
74 base::DictionaryValue /* manifest */)
76 // Reply when the utility process has failed while unpacking an extension.
77 // |error_message| is a user-displayable explanation of what went wrong.
78 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackExtension_Failed,
79 base::string16 /* error_message, if any */)