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_UNPACKED_INSTALLER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 return require_modern_manifest_version_; | 62 return require_modern_manifest_version_; |
63 } | 63 } |
64 void set_require_modern_manifest_version(bool val) { | 64 void set_require_modern_manifest_version(bool val) { |
65 require_modern_manifest_version_ = val; | 65 require_modern_manifest_version_ = val; |
66 } | 66 } |
67 | 67 |
68 void set_on_failure_callback(const OnFailureCallback& callback) { | 68 void set_on_failure_callback(const OnFailureCallback& callback) { |
69 on_failure_callback_ = callback; | 69 on_failure_callback_ = callback; |
70 } | 70 } |
71 | 71 |
| 72 void set_be_noisy_on_failure(bool be_noisy_on_failure) { |
| 73 be_noisy_on_failure_ = be_noisy_on_failure; |
| 74 } |
| 75 |
72 private: | 76 private: |
73 friend class base::RefCountedThreadSafe<UnpackedInstaller>; | 77 friend class base::RefCountedThreadSafe<UnpackedInstaller>; |
74 | 78 |
75 explicit UnpackedInstaller(ExtensionService* extension_service); | 79 explicit UnpackedInstaller(ExtensionService* extension_service); |
76 virtual ~UnpackedInstaller(); | 80 virtual ~UnpackedInstaller(); |
77 | 81 |
78 // Must be called from the UI thread. | 82 // Must be called from the UI thread. |
79 void ShowInstallPrompt(); | 83 void ShowInstallPrompt(); |
80 | 84 |
81 // Calls CheckRequirements. | 85 // Calls CheckRequirements. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // loading. | 125 // loading. |
122 bool prompt_for_plugins_; | 126 bool prompt_for_plugins_; |
123 | 127 |
124 // Whether to require the extension installed to have a modern manifest | 128 // Whether to require the extension installed to have a modern manifest |
125 // version. | 129 // version. |
126 bool require_modern_manifest_version_; | 130 bool require_modern_manifest_version_; |
127 | 131 |
128 // An optional callback to set in order to be notified of failure. | 132 // An optional callback to set in order to be notified of failure. |
129 OnFailureCallback on_failure_callback_; | 133 OnFailureCallback on_failure_callback_; |
130 | 134 |
| 135 // Whether or not to be noisy (show a dialog) on failure. Defaults to true. |
| 136 bool be_noisy_on_failure_; |
| 137 |
131 // Gives access to common methods and data of an extension installer. | 138 // Gives access to common methods and data of an extension installer. |
132 ExtensionInstaller installer_; | 139 ExtensionInstaller installer_; |
133 | 140 |
134 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); | 141 DISALLOW_COPY_AND_ASSIGN(UnpackedInstaller); |
135 }; | 142 }; |
136 | 143 |
137 } // namespace extensions | 144 } // namespace extensions |
138 | 145 |
139 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ | 146 #endif // CHROME_BROWSER_EXTENSIONS_UNPACKED_INSTALLER_H_ |
OLD | NEW |