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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 const extensions::Extension* extension, | 355 const extensions::Extension* extension, |
356 const std::vector<base::FilePath>& retained_file_paths); | 356 const std::vector<base::FilePath>& retained_file_paths); |
357 | 357 |
358 // Installation was successful. This is declared virtual for testing. | 358 // Installation was successful. This is declared virtual for testing. |
359 virtual void OnInstallSuccess(const extensions::Extension* extension, | 359 virtual void OnInstallSuccess(const extensions::Extension* extension, |
360 SkBitmap* icon); | 360 SkBitmap* icon); |
361 | 361 |
362 // Installation failed. This is declared virtual for testing. | 362 // Installation failed. This is declared virtual for testing. |
363 virtual void OnInstallFailure(const extensions::CrxInstallerError& error); | 363 virtual void OnInstallFailure(const extensions::CrxInstallerError& error); |
364 | 364 |
| 365 void set_callback_for_test(const ShowDialogCallback& show_dialog_callback) { |
| 366 show_dialog_callback_ = show_dialog_callback; |
| 367 } |
| 368 |
365 protected: | 369 protected: |
366 friend class extensions::ExtensionWebstorePrivateApiTest; | 370 friend class extensions::ExtensionWebstorePrivateApiTest; |
367 friend class WebstoreStartupInstallUnpackFailureTest; | 371 friend class WebstoreStartupInstallUnpackFailureTest; |
368 | 372 |
369 // Whether or not we should record the oauth2 grant upon successful install. | 373 // Whether or not we should record the oauth2 grant upon successful install. |
370 bool record_oauth2_grant_; | 374 bool record_oauth2_grant_; |
371 | 375 |
372 private: | 376 private: |
373 friend class GalleryInstallApiTestObserver; | 377 friend class GalleryInstallApiTestObserver; |
374 | 378 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 Delegate* delegate_; | 416 Delegate* delegate_; |
413 | 417 |
414 // A pre-filled prompt. | 418 // A pre-filled prompt. |
415 scoped_refptr<Prompt> prompt_; | 419 scoped_refptr<Prompt> prompt_; |
416 | 420 |
417 // Used to show the confirm dialog. | 421 // Used to show the confirm dialog. |
418 ShowDialogCallback show_dialog_callback_; | 422 ShowDialogCallback show_dialog_callback_; |
419 }; | 423 }; |
420 | 424 |
421 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 425 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
OLD | NEW |