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_PROMPT_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 | 253 |
254 typedef base::Callback<void(ExtensionInstallPromptShowParams*, | 254 typedef base::Callback<void(ExtensionInstallPromptShowParams*, |
255 const DoneCallback&, | 255 const DoneCallback&, |
256 std::unique_ptr<ExtensionInstallPrompt::Prompt>)> | 256 std::unique_ptr<ExtensionInstallPrompt::Prompt>)> |
257 ShowDialogCallback; | 257 ShowDialogCallback; |
258 | 258 |
259 // Callback to show the default extension install dialog. | 259 // Callback to show the default extension install dialog. |
260 // The implementations of this function are platform-specific. | 260 // The implementations of this function are platform-specific. |
261 static ShowDialogCallback GetDefaultShowDialogCallback(); | 261 static ShowDialogCallback GetDefaultShowDialogCallback(); |
262 | 262 |
| 263 // Callback to show the Views extension install dialog. Don't use this; it is |
| 264 // a temporary hack for MacViews. |
| 265 // TODO(ellyjones): Remove this. |
| 266 #if defined(OS_MACOSX) |
| 267 static ShowDialogCallback GetViewsShowDialogCallback(); |
| 268 #endif |
| 269 |
263 // Returns the appropriate prompt type for the given |extension|. | 270 // Returns the appropriate prompt type for the given |extension|. |
264 // TODO(devlin): This method is yucky - callers probably only care about one | 271 // TODO(devlin): This method is yucky - callers probably only care about one |
265 // prompt type. We just need to comb through and figure out what it is. | 272 // prompt type. We just need to comb through and figure out what it is. |
266 static PromptType GetReEnablePromptTypeForExtension( | 273 static PromptType GetReEnablePromptTypeForExtension( |
267 content::BrowserContext* context, | 274 content::BrowserContext* context, |
268 const extensions::Extension* extension); | 275 const extensions::Extension* extension); |
269 | 276 |
270 // Creates a dummy extension from the |manifest|, replacing the name and | 277 // Creates a dummy extension from the |manifest|, replacing the name and |
271 // description with the localizations if provided. | 278 // description with the localizations if provided. |
272 static scoped_refptr<extensions::Extension> GetLocalizedExtensionForDisplay( | 279 static scoped_refptr<extensions::Extension> GetLocalizedExtensionForDisplay( |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
379 | 386 |
380 // Whether or not the |show_dialog_callback_| was called. | 387 // Whether or not the |show_dialog_callback_| was called. |
381 bool did_call_show_dialog_; | 388 bool did_call_show_dialog_; |
382 | 389 |
383 base::WeakPtrFactory<ExtensionInstallPrompt> weak_factory_; | 390 base::WeakPtrFactory<ExtensionInstallPrompt> weak_factory_; |
384 | 391 |
385 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPrompt); | 392 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPrompt); |
386 }; | 393 }; |
387 | 394 |
388 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 395 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
OLD | NEW |