OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_
HELPER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_
HELPER_H_ |
| 7 |
| 8 #include "base/bind.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 11 |
| 12 class Profile; |
| 13 |
| 14 namespace content { |
| 15 class BrowserContext; |
| 16 class WebContents; |
| 17 } |
| 18 |
| 19 namespace extensions { |
| 20 class Extension; |
| 21 |
| 22 class ShowPermissionsDialogHelper : public ExtensionInstallPrompt::Delegate { |
| 23 public: |
| 24 ShowPermissionsDialogHelper(); |
| 25 ~ShowPermissionsDialogHelper() override; |
| 26 |
| 27 void Show(content::WebContents* web_contents, |
| 28 content::BrowserContext* browser_context, |
| 29 const Extension* extension, |
| 30 bool from_extensions_page, |
| 31 const base::Closure& on_complete); |
| 32 |
| 33 private: |
| 34 // ExtensionInstallPrompt::Delegate: |
| 35 void InstallUIProceed() override; |
| 36 void InstallUIAbort(bool user_initiated) override; |
| 37 |
| 38 void AppInfoDialogClosed(); |
| 39 |
| 40 base::Closure on_complete_callback_; |
| 41 |
| 42 scoped_ptr<ExtensionInstallPrompt> prompt_; |
| 43 |
| 44 Profile* profile_; |
| 45 |
| 46 std::string extension_id_; |
| 47 |
| 48 DISALLOW_COPY_AND_ASSIGN(ShowPermissionsDialogHelper); |
| 49 }; |
| 50 |
| 51 } // namespace extensions |
| 52 |
| 53 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIAL
OG_HELPER_H_ |
OLD | NEW |