Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / common / extension_utility_messages.h
blob1d140472d5d44cd526aaa3cd0c413ba6fdc3bd3b
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<base::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 // Tell the utility process to unzip the zipfile at a given path into a
45 // directory at the second given path.
46 IPC_MESSAGE_CONTROL2(ExtensionUtilityMsg_UnzipToDir,
47 base::FilePath /* zip_file */,
48 base::FilePath /* dir */)
50 // Tells the utility process to unpack the given extension file in its
51 // directory and verify that it is valid.
52 IPC_MESSAGE_CONTROL4(ExtensionUtilityMsg_UnpackExtension,
53 base::FilePath /* extension_filename */,
54 std::string /* extension_id */,
55 int /* Manifest::Location */,
56 int /* InitFromValue flags */)
58 //------------------------------------------------------------------------------
59 // Utility process host messages:
60 // These are messages from the utility process to the browser.
62 // Reply when the utility process has succeeded in parsing an update manifest
63 // xml document.
64 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_ParseUpdateManifest_Succeeded,
65 UpdateManifest::Results /* updates */)
67 // Reply when an error occurred parsing the update manifest. |error_message|
68 // is a description of what went wrong suitable for logging.
69 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_ParseUpdateManifest_Failed,
70 std::string /* error_message, if any */)
72 // Reply when the utility process is done unzipping a file. |unpacked_path|
73 // is the directory which contains the unzipped contents.
74 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnzipToDir_Succeeded,
75 base::FilePath /* unpacked_path */)
77 // Reply when the utility process failed to unzip a file. |error| contains
78 // an error string to be reported to the user.
79 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnzipToDir_Failed,
80 std::string /* error */)
82 // Reply when the utility process is done unpacking an extension. |manifest|
83 // is the parsed manifest.json file.
84 // The unpacker should also have written out files containing the decoded
85 // images and message catalogs from the extension. The data is written into a
86 // DecodedImages struct into a file named kDecodedImagesFilename in the
87 // directory that was passed in. This is done because the data is too large to
88 // pass over IPC.
89 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnpackExtension_Succeeded,
90 base::DictionaryValue /* manifest */)
92 // Reply when the utility process has failed while unpacking an extension.
93 // |error_message| is a user-displayable explanation of what went wrong.
94 IPC_MESSAGE_CONTROL1(ExtensionUtilityHostMsg_UnpackExtension_Failed,
95 base::string16 /* error_message, if any */)