Index: chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h |
diff --git a/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h b/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e092b6c6d37a0d4ebe280d918a6c48b32dbb407e |
--- /dev/null |
+++ b/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h |
@@ -0,0 +1,53 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_HELPER_H_ |
+#define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_HELPER_H_ |
+ |
+#include "base/bind.h" |
+#include "base/memory/scoped_ptr.h" |
+#include "chrome/browser/extensions/extension_install_prompt.h" |
+ |
+class Profile; |
+ |
+namespace content { |
+class BrowserContext; |
+class WebContents; |
+} |
+ |
+namespace extensions { |
+class Extension; |
+ |
+class ShowPermissionsDialogHelper : public ExtensionInstallPrompt::Delegate { |
+ public: |
+ ShowPermissionsDialogHelper(); |
+ ~ShowPermissionsDialogHelper() override; |
+ |
+ void Show(content::WebContents* web_contents, |
+ content::BrowserContext* browser_context, |
+ const Extension* extension, |
+ bool from_extensions_page, |
+ const base::Closure& on_complete); |
+ |
+ private: |
+ // ExtensionInstallPrompt::Delegate: |
+ void InstallUIProceed() override; |
+ void InstallUIAbort(bool user_initiated) override; |
+ |
+ void AppInfoDialogClosed(); |
+ |
+ base::Closure on_complete_callback_; |
+ |
+ scoped_ptr<ExtensionInstallPrompt> prompt_; |
+ |
+ Profile* profile_; |
+ |
+ std::string extension_id_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ShowPermissionsDialogHelper); |
+}; |
+ |
+} // namespace extensions |
+ |
+#endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_HELPER_H_ |