| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 return install_ui_.get(); | 302 return install_ui_.get(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 // This is called by the bundle installer to verify whether the bundle | 305 // This is called by the bundle installer to verify whether the bundle |
| 306 // should be installed. | 306 // should be installed. |
| 307 // | 307 // |
| 308 // We *MUST* eventually call either Proceed() or Abort() on |bundle|. | 308 // We *MUST* eventually call either Proceed() or Abort() on |bundle|. |
| 309 virtual void ConfirmBundleInstall( | 309 virtual void ConfirmBundleInstall( |
| 310 extensions::BundleInstaller* bundle, | 310 extensions::BundleInstaller* bundle, |
| 311 const SkBitmap* icon, | 311 const SkBitmap* icon, |
| 312 const extensions::PermissionSet* permissions); | 312 scoped_ptr<const extensions::PermissionSet> permissions); |
| 313 | 313 |
| 314 // This is called by the bundle installer to verify the permissions for a | 314 // This is called by the bundle installer to verify the permissions for a |
| 315 // delegated bundle install. | 315 // delegated bundle install. |
| 316 // | 316 // |
| 317 // We *MUST* eventually call either Proceed() or Abort() on |bundle|. | 317 // We *MUST* eventually call either Proceed() or Abort() on |bundle|. |
| 318 virtual void ConfirmPermissionsForDelegatedBundleInstall( | 318 virtual void ConfirmPermissionsForDelegatedBundleInstall( |
| 319 extensions::BundleInstaller* bundle, | 319 extensions::BundleInstaller* bundle, |
| 320 const std::string& delegated_username, | 320 const std::string& delegated_username, |
| 321 const SkBitmap* icon, | 321 const SkBitmap* icon, |
| 322 const extensions::PermissionSet* permissions); | 322 scoped_ptr<const extensions::PermissionSet> permissions); |
| 323 | 323 |
| 324 // This is called by the standalone installer to verify whether the install | 324 // This is called by the standalone installer to verify whether the install |
| 325 // from the webstore should proceed. | 325 // from the webstore should proceed. |
| 326 // | 326 // |
| 327 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. | 327 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. |
| 328 virtual void ConfirmStandaloneInstall(Delegate* delegate, | 328 virtual void ConfirmStandaloneInstall(Delegate* delegate, |
| 329 const extensions::Extension* extension, | 329 const extensions::Extension* extension, |
| 330 SkBitmap* icon, | 330 SkBitmap* icon, |
| 331 scoped_refptr<Prompt> prompt); | 331 scoped_refptr<Prompt> prompt); |
| 332 | 332 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 virtual void ConfirmExternalInstall( | 374 virtual void ConfirmExternalInstall( |
| 375 Delegate* delegate, | 375 Delegate* delegate, |
| 376 const extensions::Extension* extension, | 376 const extensions::Extension* extension, |
| 377 const ShowDialogCallback& show_dialog_callback, | 377 const ShowDialogCallback& show_dialog_callback, |
| 378 scoped_refptr<Prompt> prompt); | 378 scoped_refptr<Prompt> prompt); |
| 379 | 379 |
| 380 // This is called by the extension permissions API to verify whether an | 380 // This is called by the extension permissions API to verify whether an |
| 381 // extension may be granted additional permissions. | 381 // extension may be granted additional permissions. |
| 382 // | 382 // |
| 383 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. | 383 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. |
| 384 virtual void ConfirmPermissions(Delegate* delegate, | 384 virtual void ConfirmPermissions( |
| 385 const extensions::Extension* extension, | 385 Delegate* delegate, |
| 386 const extensions::PermissionSet* permissions); | 386 const extensions::Extension* extension, |
| 387 scoped_ptr<const extensions::PermissionSet> permissions); |
| 387 | 388 |
| 388 // This is called by the app handler launcher to review what permissions the | 389 // This is called by the app handler launcher to review what permissions the |
| 389 // extension or app currently has. | 390 // extension or app currently has. |
| 390 // | 391 // |
| 391 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. | 392 // We *MUST* eventually call either Proceed() or Abort() on |delegate|. |
| 392 virtual void ReviewPermissions( | 393 virtual void ReviewPermissions( |
| 393 Delegate* delegate, | 394 Delegate* delegate, |
| 394 const extensions::Extension* extension, | 395 const extensions::Extension* extension, |
| 395 const std::vector<base::FilePath>& retained_file_paths, | 396 const std::vector<base::FilePath>& retained_file_paths, |
| 396 const std::vector<base::string16>& retained_device_messages); | 397 const std::vector<base::string16>& retained_device_messages); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 // The bundle we are showing the UI for, if type BUNDLE_INSTALL_PROMPT or | 446 // The bundle we are showing the UI for, if type BUNDLE_INSTALL_PROMPT or |
| 446 // DELEGATED_BUNDLE_PERMISSIONS_PROMPT. | 447 // DELEGATED_BUNDLE_PERMISSIONS_PROMPT. |
| 447 const extensions::BundleInstaller* bundle_; | 448 const extensions::BundleInstaller* bundle_; |
| 448 | 449 |
| 449 // The name of the user we are asking about, if type | 450 // The name of the user we are asking about, if type |
| 450 // DELEGATED_PERMISSIONS_PROMPT or DELEGATED_BUNDLE_PERMISSIONS_PROMPT. | 451 // DELEGATED_PERMISSIONS_PROMPT or DELEGATED_BUNDLE_PERMISSIONS_PROMPT. |
| 451 std::string delegated_username_; | 452 std::string delegated_username_; |
| 452 | 453 |
| 453 // A custom set of permissions to show in the install prompt instead of the | 454 // A custom set of permissions to show in the install prompt instead of the |
| 454 // extension's active permissions. | 455 // extension's active permissions. |
| 455 scoped_refptr<const extensions::PermissionSet> custom_permissions_; | 456 scoped_ptr<const extensions::PermissionSet> custom_permissions_; |
| 456 | 457 |
| 457 // The object responsible for doing the UI specific actions. | 458 // The object responsible for doing the UI specific actions. |
| 458 scoped_ptr<extensions::ExtensionInstallUI> install_ui_; | 459 scoped_ptr<extensions::ExtensionInstallUI> install_ui_; |
| 459 | 460 |
| 460 // Parameters to show the confirmation UI. | 461 // Parameters to show the confirmation UI. |
| 461 scoped_ptr<ExtensionInstallPromptShowParams> show_params_; | 462 scoped_ptr<ExtensionInstallPromptShowParams> show_params_; |
| 462 | 463 |
| 463 // The delegate we will call Proceed/Abort on after confirmation UI. | 464 // The delegate we will call Proceed/Abort on after confirmation UI. |
| 464 Delegate* delegate_; | 465 Delegate* delegate_; |
| 465 | 466 |
| 466 // A pre-filled prompt. | 467 // A pre-filled prompt. |
| 467 scoped_refptr<Prompt> prompt_; | 468 scoped_refptr<Prompt> prompt_; |
| 468 | 469 |
| 469 // Used to show the confirm dialog. | 470 // Used to show the confirm dialog. |
| 470 ShowDialogCallback show_dialog_callback_; | 471 ShowDialogCallback show_dialog_callback_; |
| 471 }; | 472 }; |
| 472 | 473 |
| 473 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ | 474 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INSTALL_PROMPT_H_ |
| OLD | NEW |