tree: 9cf01207e52237d2d0763c3b1e5667c772d1d25d [path history] [tgz]
  1. document_scanner_discovery_confirmation_dialog.cc
  2. document_scanner_discovery_confirmation_dialog_browsertest.cc
  3. document_scanner_start_scan_confirmation_dialog.cc
  4. document_scanner_start_scan_confirmation_dialog_browsertest.cc
  5. extension_install_friction_dialog_interactive_uitest.cc
  6. mv2_deprecation_disabled_dialog.cc
  7. mv2_deprecation_keep_dialog.cc
  8. mv2_deprecation_keep_dialog_interactive_uitest.cc
  9. mv2_deprecation_reenable_dialog.cc
  10. mv2_deprecation_reenable_dialog_browsertest.cc
  11. mv2_disabled_dialog_controller_interactive_uitest.cc
  12. print_job_confirmation_dialog.cc
  13. README.md
  14. request_file_system_dialog.cc
  15. request_file_system_dialog_browsertest.cc
  16. upload_extension_to_account_dialog.cc
  17. upload_extension_to_account_dialog_browsertest.cc
chrome/browser/ui/views/extensions/dialogs/README.md

Extensions Dialogs

Steps for creating a new dialog

  1. If the dialog is called from code outside views, which most likely is, add Show<Name>Dialog method to chrome/browser/ui/extensions/extensions_dialogs.h
  2. Implement Show<NameDialog in chrome/browser/ui/views/extensions:
  • Method should receive all the information to display in the UI, and should not compute any extensions logic (e.g pass extension_site_access value instead of computing the site access here).
  • Use ui::DialogModel::Builder to create the dialog. See more information on ui/base/models/dialog_model.h
  • Show the dialog using a util method from chrome/browser/ui/extensions/extension_dialog_utils.h
namespace extensions {

void Show<Name>Dialog(...) {
  ui::DialogModel::Builder
    .SetTitle(...)
    // Set the dialog information. If necessary, use ui::DialogModelDelegate.

  ShowDialog(...)
}

}  // namespace
  1. Add interactive tests using Kombucha. See more information on chrome/test/interaction/README.md