Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / extensions / common / constants.h
index f55e517..d952989 100644 (file)
@@ -5,7 +5,9 @@
 #ifndef EXTENSIONS_COMMON_CONSTANTS_H_
 #define EXTENSIONS_COMMON_CONSTANTS_H_
 
+#include "base/basictypes.h"
 #include "base/files/file_path.h"
+#include "ui/base/layout.h"
 
 namespace extensions {
 
@@ -27,6 +29,16 @@ extern const base::FilePath::CharType kMessagesFilename[];
 // The base directory for subdirectories with platform-specific code.
 extern const base::FilePath::CharType kPlatformSpecificFolder[];
 
+// A directory reserved for metadata, generated either by the webstore
+// or chrome.
+extern const base::FilePath::CharType kMetadataFolder[];
+
+// Name of the verified contents file within the metadata folder.
+extern const base::FilePath::CharType kVerifiedContentsFilename[];
+
+// Name of the computed hashes file within the metadata folder.
+extern const base::FilePath::CharType kComputedHashesFilename[];
+
 // The name of the directory inside the profile where extensions are
 // installed to.
 extern const char kInstallDirectoryName[];
@@ -86,6 +98,58 @@ extern const char kStateStoreName[];
 // rules are stored.
 extern const char kRulesStoreName[];
 
+// The URL query parameter key corresponding to multi-login user index.
+extern const char kAuthUserQueryKey[];
+
+// Mime type strings
+extern const char kMimeTypeJpeg[];
+extern const char kMimeTypePng[];
+
+// The extension id of the Web Store component application.
+extern const char kWebStoreAppId[];
+
 }  // namespace extensions
 
+namespace extension_misc {
+
+// Matches chrome.windows.WINDOW_ID_NONE.
+const int kUnknownWindowId = -1;
+
+// Matches chrome.windows.WINDOW_ID_CURRENT.
+const int kCurrentWindowId = -2;
+
+// NOTE: If you change this list, you should also change kExtensionIconSizes
+// in cc file.
+enum ExtensionIcons {
+  EXTENSION_ICON_GIGANTOR = 512,
+  EXTENSION_ICON_EXTRA_LARGE = 256,
+  EXTENSION_ICON_LARGE = 128,
+  EXTENSION_ICON_MEDIUM = 48,
+  EXTENSION_ICON_SMALL = 32,
+  EXTENSION_ICON_SMALLISH = 24,
+  EXTENSION_ICON_ACTION = 19,
+  EXTENSION_ICON_BITTY = 16,
+  EXTENSION_ICON_INVALID = 0,
+};
+
+// List of sizes for extension icons that can be defined in the manifest.
+extern const int kExtensionIconSizes[];
+extern const size_t kNumExtensionIconSizes;
+
+struct IconRepresentationInfo {
+  // Size in pixels.
+  const int size;
+  // Size as a string that will be used to retrieve representation value from
+  // ExtensionAction SetIcon function arguments.
+  const char* const size_string;
+  // Scale factor for which the representation should be used.
+  const ui::ScaleFactor scale;
+};
+
+// The icon representations for extension actions.
+extern const IconRepresentationInfo kExtensionActionIconSizes[];
+const size_t kNumExtensionActionIconSizes = 2u;
+
+}  // namespace extension_misc
+
 #endif  // EXTENSIONS_COMMON_CONSTANTS_H_