OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_
HELPER_H_ | 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_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIALOG_
HELPER_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/bind.h" | 10 #include "base/bind.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "chrome/browser/extensions/extension_install_prompt.h" | 12 #include "chrome/browser/extensions/extension_install_prompt.h" |
12 | 13 |
13 class Profile; | 14 class Profile; |
14 | 15 |
15 namespace content { | 16 namespace content { |
16 class BrowserContext; | 17 class BrowserContext; |
17 class WebContents; | 18 class WebContents; |
18 } | 19 } |
19 | 20 |
20 namespace extensions { | 21 namespace extensions { |
(...skipping 14 matching lines...) Expand all Loading... |
35 ShowPermissionsDialogHelper(Profile* profile, | 36 ShowPermissionsDialogHelper(Profile* profile, |
36 const base::Closure& on_complete); | 37 const base::Closure& on_complete); |
37 ~ShowPermissionsDialogHelper(); // Manages its own lifetime. | 38 ~ShowPermissionsDialogHelper(); // Manages its own lifetime. |
38 | 39 |
39 // Shows the old-style (not AppInfo) permissions dialog. | 40 // Shows the old-style (not AppInfo) permissions dialog. |
40 void ShowPermissionsDialog(content::WebContents* web_contents, | 41 void ShowPermissionsDialog(content::WebContents* web_contents, |
41 const Extension* extension); | 42 const Extension* extension); |
42 | 43 |
43 void OnInstallPromptDone(ExtensionInstallPrompt::Result result); | 44 void OnInstallPromptDone(ExtensionInstallPrompt::Result result); |
44 | 45 |
45 scoped_ptr<ExtensionInstallPrompt> prompt_; | 46 std::unique_ptr<ExtensionInstallPrompt> prompt_; |
46 | 47 |
47 Profile* profile_; | 48 Profile* profile_; |
48 | 49 |
49 base::Closure on_complete_; | 50 base::Closure on_complete_; |
50 | 51 |
51 std::string extension_id_; | 52 std::string extension_id_; |
52 | 53 |
53 DISALLOW_COPY_AND_ASSIGN(ShowPermissionsDialogHelper); | 54 DISALLOW_COPY_AND_ASSIGN(ShowPermissionsDialogHelper); |
54 }; | 55 }; |
55 | 56 |
56 } // namespace extensions | 57 } // namespace extensions |
57 | 58 |
58 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIAL
OG_HELPER_H_ | 59 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_SHOW_PERMISSIONS_DIAL
OG_HELPER_H_ |
OLD | NEW |