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.
4
5#ifndef CHROME_COMMON_EXTENSIONS_API_WEBSTORE_WEBSTORE_API_CONSTANTS_H_
6#define CHROME_COMMON_EXTENSIONS_API_WEBSTORE_WEBSTORE_API_CONSTANTS_H_
7
8namespace extensions {
9namespace api {
10namespace webstore {
11
12// An enum for listener types. This is used when creating/reading the mask for
13// IPC messages.
14enum ListenerType {
15  INSTALL_STAGE_LISTENER = 1,
16  DOWNLOAD_PROGRESS_LISTENER = 1 << 1
17};
18
19// An enum to represent which stage the installation is in.
20enum InstallStage {
21  INSTALL_STAGE_DOWNLOADING = 0,
22  INSTALL_STAGE_INSTALLING,
23};
24
25// Result codes returned by WebstoreStandaloneInstaller and its subclasses.
26// IMPORTANT: Keep this list in sync with both the definition in
27// chrome/common/extensions/api/webstore.json and
28// chrome/common/extensions/webstore_install_result.h!
29extern const char* kInstallResultCodes[];
30
31extern const char kInstallStageDownloading[];
32extern const char kInstallStageInstalling[];
33extern const char kOnInstallStageChangedMethodName[];
34extern const char kOnDownloadProgressMethodName[];
35
36}  // namespace webstore
37}  // namespace api
38}  // namespace extensions
39
40#endif  // CHROME_COMMON_EXTENSIONS_API_WEBSTORE_WEBSTORE_API_CONSTANTS_H_
41