Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / extension_install_prompt.h
index 59dcd6c..bc185eb 100644 (file)
@@ -53,6 +53,15 @@ class InfoBarDelegate;
 class ExtensionInstallPrompt
     : public base::SupportsWeakPtr<ExtensionInstallPrompt> {
  public:
+  // A setting to cause extension/app installs from the webstore skip the normal
+  // confirmation dialog. This should only be used in tests.
+  enum AutoConfirmForTests {
+    NONE,    // The prompt will show normally.
+    ACCEPT,  // The prompt will always accept.
+    CANCEL,  // The prompt will always cancel.
+  };
+  static AutoConfirmForTests g_auto_confirm_for_tests;
+
   // This enum is associated with Extensions.InstallPrompt_Type UMA histogram.
   // Do not modify existing values and add new values only to the end.
   enum PromptType {
@@ -74,6 +83,8 @@ class ExtensionInstallPrompt
     RETAINED_FILES_DETAILS,
   };
 
+  static std::string PromptTypeToString(PromptType type);
+
   // Extra information needed to display an installation or uninstallation
   // prompt. Gets populated with raw data and exposes getters for formatted
   // strings so that the GTK/views/Cocoa install dialogs don't have to repeat