chooser_controller.cc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. // Copyright 2016 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "components/permissions/chooser_controller.h"
  5. #include "base/notreached.h"
  6. #include "base/strings/utf_string_conversions.h"
  7. #include "components/strings/grit/components_strings.h"
  8. #include "ui/base/l10n/l10n_util.h"
  9. namespace permissions {
  10. ChooserController::ChooserController(std::u16string title) : title_(title) {}
  11. ChooserController::~ChooserController() = default;
  12. std::u16string ChooserController::GetTitle() const {
  13. return title_;
  14. }
  15. void ChooserController::View::OnAdapterAuthorizationChanged(bool authorized) {
  16. NOTREACHED();
  17. }
  18. bool ChooserController::ShouldShowIconBeforeText() const {
  19. return false;
  20. }
  21. bool ChooserController::ShouldShowHelpButton() const {
  22. return true;
  23. }
  24. bool ChooserController::ShouldShowReScanButton() const {
  25. return false;
  26. }
  27. bool ChooserController::AllowMultipleSelection() const {
  28. return false;
  29. }
  30. bool ChooserController::ShouldShowSelectAllCheckbox() const {
  31. return false;
  32. }
  33. std::u16string ChooserController::GetCancelButtonLabel() const {
  34. return l10n_util::GetStringUTF16(IDS_DEVICE_CHOOSER_CANCEL_BUTTON_TEXT);
  35. }
  36. std::u16string ChooserController::GetSelectAllCheckboxLabel() const {
  37. return std::u16string();
  38. }
  39. bool ChooserController::BothButtonsAlwaysEnabled() const {
  40. return false;
  41. }
  42. bool ChooserController::TableViewAlwaysDisabled() const {
  43. return false;
  44. }
  45. int ChooserController::GetSignalStrengthLevel(size_t index) const {
  46. return -1;
  47. }
  48. bool ChooserController::IsConnected(size_t index) const {
  49. return false;
  50. }
  51. bool ChooserController::IsPaired(size_t index) const {
  52. return false;
  53. }
  54. void ChooserController::RefreshOptions() {
  55. NOTREACHED();
  56. }
  57. void ChooserController::OpenAdapterOffHelpUrl() const {
  58. NOTREACHED();
  59. }
  60. void ChooserController::OpenPermissionPreferences() const {
  61. NOTREACHED();
  62. }
  63. } // namespace permissions