| 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 static ShowDialogCallback GetViewsShowDialogCallback(); |
| 266 |
| 263 // Returns the appropriate prompt type for the given |extension|. | 267 // Returns the appropriate prompt type for the given |extension|. |
| 264 // TODO(devlin): This method is yucky - callers probably only care about one | 268 // 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. | 269 // prompt type. We just need to comb through and figure out what it is. |
| 266 static PromptType GetReEnablePromptTypeForExtension( | 270 static PromptType GetReEnablePromptTypeForExtension( |
| 267 content::BrowserContext* context, | 271 content::BrowserContext* context, |
| 268 const extensions::Extension* extension); | 272 const extensions::Extension* extension); |
| 269 | 273 |
| 270 // Creates a dummy extension from the |manifest|, replacing the name and | 274 // Creates a dummy extension from the |manifest|, replacing the name and |
| 271 // description with the localizations if provided. | 275 // description with the localizations if provided. |
| 272 static scoped_refptr<extensions::Extension> GetLocalizedExtensionForDisplay( | 276 static scoped_refptr<extensions::Extension> GetLocalizedExtensionForDisplay( |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 | 383 |
| 380 // Whether or not the |show_dialog_callback_| was called. | 384 // Whether or not the |show_dialog_callback_| was called. |
| 381 bool did_call_show_dialog_; | 385 bool did_call_show_dialog_; |
| 382 | 386 |
| 383 base::WeakPtrFactory<ExtensionInstallPrompt> weak_factory_; | 387 base::WeakPtrFactory<ExtensionInstallPrompt> weak_factory_; |
| 384 | 388 |
| 385 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPrompt); | 389 DISALLOW_COPY_AND_ASSIGN(ExtensionInstallPrompt); |
| 386 }; | 390 }; |
| 387 | 391 |
| 388 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 392 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
| OLD | NEW |