| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EXTENSION_INSTALL_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 void ShowExtensionInstallDialog(Profile* profile, | 23 void ShowExtensionInstallDialog(Profile* profile, |
| 24 ExtensionInstallUI::Delegate* delegate, | 24 ExtensionInstallUI::Delegate* delegate, |
| 25 const ExtensionInstallUI::Prompt& prompt); | 25 const ExtensionInstallUI::Prompt& prompt); |
| 26 | 26 |
| 27 // The implementations of this function are platform-specific. | 27 // The implementations of this function are platform-specific. |
| 28 void ShowExtensionInstallDialogImpl(Profile* profile, | 28 void ShowExtensionInstallDialogImpl(Profile* profile, |
| 29 ExtensionInstallUI::Delegate* delegate, | 29 ExtensionInstallUI::Delegate* delegate, |
| 30 const ExtensionInstallUI::Prompt& prompt); | 30 const ExtensionInstallUI::Prompt& prompt); |
| 31 | 31 |
| 32 // Wrapper around ShowExtensionInstallDialog that shows the install dialog for | |
| 33 // a given manifest (that corresponds to an extension about to be installed with | |
| 34 // ID |id|). If the name or description in the manifest is a localized | |
| 35 // placeholder, it may be overidden with |localized_name| or | |
| 36 // |localized_description| (which may be empty). The Extension instance | |
| 37 // that's parsed is returned via |dummy_extension|. |prompt| should be fully | |
| 38 // populated except for the permissions field, which will be extracted from the | |
| 39 // extension. | |
| 40 // Returns true if |dummy_extension| is valid and delegate methods will be | |
| 41 // called. | |
| 42 bool ShowExtensionInstallDialogForManifest( | |
| 43 Profile *profile, | |
| 44 ExtensionInstallUI::Delegate* delegate, | |
| 45 const base::DictionaryValue* manifest, | |
| 46 const std::string& id, | |
| 47 const std::string& localized_name, | |
| 48 const std::string& localized_description, | |
| 49 SkBitmap* icon, | |
| 50 const ExtensionInstallUI::Prompt& prompt, | |
| 51 scoped_refptr<Extension>* dummy_extension); | |
| 52 | |
| 53 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ | 32 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_DIALOG_H_ |
| OLD | NEW |