Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "googleurl/src/gurl.h" | |
| 12 | 13 |
| 13 // Keys used in JSON representation of extensions. | 14 // Keys used in JSON representation of extensions. |
| 14 namespace extension_manifest_keys { | 15 namespace extension_manifest_keys { |
| 15 extern const char* kAllFrames; | 16 extern const char* kAllFrames; |
| 16 extern const char* kAltKey; | 17 extern const char* kAltKey; |
| 17 extern const char* kApp; | 18 extern const char* kApp; |
| 18 extern const char* kBackground; | 19 extern const char* kBackground; |
| 19 extern const char* kBrowserAction; | 20 extern const char* kBrowserAction; |
| 20 extern const char* kBrowseURLs; | 21 extern const char* kBrowseURLs; |
| 21 extern const char* kChromeURLOverrides; | 22 extern const char* kChromeURLOverrides; |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 261 extern const char* kReservedMessageFound; | 262 extern const char* kReservedMessageFound; |
| 262 extern const char* kSidebarExperimental; | 263 extern const char* kSidebarExperimental; |
| 263 extern const char* kThemesCannotContainExtensions; | 264 extern const char* kThemesCannotContainExtensions; |
| 264 extern const char* kWebContentMustBeEnabled; | 265 extern const char* kWebContentMustBeEnabled; |
| 265 #if defined(OS_CHROMEOS) | 266 #if defined(OS_CHROMEOS) |
| 266 extern const char* kIllegalPlugins; | 267 extern const char* kIllegalPlugins; |
| 267 #endif | 268 #endif |
| 268 } // namespace extension_manifest_errors | 269 } // namespace extension_manifest_errors |
| 269 | 270 |
| 270 namespace extension_urls { | 271 namespace extension_urls { |
| 272 // Returns the URL prefix for the extension/apps gallery. Can be set via the | |
| 273 // --apps-gallery-url switch. The URL returned will not contain a trailing | |
| 274 // slash. Do not use this as a prefix/extent for the store. Instead see | |
| 275 // ExtensionService::GetWebStoreApp or | |
| 276 // ExtensionService::IsDownloadFromGallery | |
| 277 std::string GetWebstoreLaunchURL(); | |
| 278 | |
| 279 // Returns the URL prefix for an item in the extension/app gallery. This URL | |
| 280 // will contain a trailing slash and should be concatenated with an item ID | |
| 281 // to get the item detail URL. | |
| 282 std::string GetWebstoreItemDetailURLPrefix(); | |
| 283 | |
| 284 // Return the update URL used by gallery/webstore extensions/apps. | |
|
asargent_no_longer_on_chrome
2011/08/25 00:05:09
Can you add a note to this comment that |secure| m
Mihai Parparita -not on Chrome
2011/08/25 00:46:29
Done.
| |
| 285 GURL GetWebstoreUpdateUrl(bool secure); | |
| 286 | |
| 287 // Return the URL for an extension/app's .crx file that is hosted by the | |
| 288 // webstore. | |
| 289 GURL GetWebstoreInstallUrl(const std::string& extension_id, | |
| 290 const std::string& locale); | |
| 291 | |
| 271 // The greatest common prefixes of the main extensions gallery's browse and | 292 // The greatest common prefixes of the main extensions gallery's browse and |
| 272 // download URLs. | 293 // download URLs. |
| 273 extern const char* kGalleryBrowsePrefix; | 294 extern const char* kGalleryBrowsePrefix; |
| 274 | 295 |
| 275 // Same thing for the "minigallery". The minigallery is the temporary static | 296 // Same thing for the "minigallery". The minigallery is the temporary static |
| 276 // themes gallery that we put up when we launched themes. | 297 // themes gallery that we put up when we launched themes. |
| 277 extern const char* kMiniGalleryBrowsePrefix; | 298 extern const char* kMiniGalleryBrowsePrefix; |
| 278 extern const char* kMiniGalleryDownloadPrefix; | 299 extern const char* kMiniGalleryDownloadPrefix; |
| 279 } // namespace extension_urls | 300 } // namespace extension_urls |
| 280 | 301 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 413 INSTALL_CAUSE_EXTERNAL_FILE, | 434 INSTALL_CAUSE_EXTERNAL_FILE, |
| 414 INSTALL_CAUSE_AUTOMATION, | 435 INSTALL_CAUSE_AUTOMATION, |
| 415 NUM_INSTALL_CAUSES | 436 NUM_INSTALL_CAUSES |
| 416 }; | 437 }; |
| 417 | 438 |
| 418 enum UnloadedExtensionReason { | 439 enum UnloadedExtensionReason { |
| 419 UNLOAD_REASON_DISABLE, // Extension is being disabled. | 440 UNLOAD_REASON_DISABLE, // Extension is being disabled. |
| 420 UNLOAD_REASON_UPDATE, // Extension is being updated to a newer version. | 441 UNLOAD_REASON_UPDATE, // Extension is being updated to a newer version. |
| 421 UNLOAD_REASON_UNINSTALL, // Extension is being uninstalled. | 442 UNLOAD_REASON_UNINSTALL, // Extension is being uninstalled. |
| 422 }; | 443 }; |
| 423 | 444 } // extension_misc |
| 424 // Returns the URL prefix for the extension/apps gallery. Can be set via the | |
| 425 // --apps-gallery-url switch. The URL returned will not contain a trailing | |
| 426 // slash. Do not use this as a prefix/extent for the store. Instead see | |
| 427 // ExtensionService::GetWebStoreApp or | |
| 428 // ExtensionService::IsDownloadFromGallery | |
| 429 std::string GetWebstoreLaunchURL(); | |
| 430 | |
| 431 // Returns the URL prefix for an item in the extension/app gallery. This URL | |
| 432 // will contain a trailing slash and should be concatenated with an item ID | |
| 433 // to get the item detail URL. | |
| 434 std::string GetWebstoreItemDetailURLPrefix(); | |
| 435 } // extension_misc | |
| 436 | 445 |
| 437 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ | 446 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |
| OLD | NEW |