#include "components/permissions/bluetooth_chooser_controller.h"
#include "base/check_op.h"
#include "base/not_fatal_until.h"
#include "base/notreached.h"
#include "base/ranges/algorithm.h"
#include "base/strings/utf_string_conversions.h"
#include "components/strings/grit/components_branded_strings.h"
#include "components/strings/grit/components_strings.h"
#include "ui/base/l10n/l10n_util.h"
namespace permissions {
BluetoothChooserController::BluetoothChooserController(
content::RenderFrameHost* owner,
const content::BluetoothChooser::EventHandler& event_handler,
std::u16string title)
: … { … }
BluetoothChooserController::~BluetoothChooserController() { … }
bool BluetoothChooserController::ShouldShowIconBeforeText() const { … }
bool BluetoothChooserController::ShouldShowReScanButton() const { … }
std::u16string BluetoothChooserController::GetNoOptionsText() const { … }
std::u16string BluetoothChooserController::GetOkButtonLabel() const { … }
std::pair<std::u16string, std::u16string>
BluetoothChooserController::GetThrobberLabelAndTooltip() const { … }
size_t BluetoothChooserController::NumOptions() const { … }
int BluetoothChooserController::GetSignalStrengthLevel(size_t index) const { … }
bool BluetoothChooserController::IsConnected(size_t index) const { … }
bool BluetoothChooserController::IsPaired(size_t index) const { … }
std::u16string BluetoothChooserController::GetOption(size_t index) const { … }
void BluetoothChooserController::RefreshOptions() { … }
void BluetoothChooserController::Select(const std::vector<size_t>& indices) { … }
void BluetoothChooserController::Cancel() { … }
void BluetoothChooserController::Close() { … }
void BluetoothChooserController::OnAdapterPresenceChanged(
content::BluetoothChooser::AdapterPresence presence) { … }
void BluetoothChooserController::OnDiscoveryStateChanged(
content::BluetoothChooser::DiscoveryState state) { … }
void BluetoothChooserController::AddOrUpdateDevice(
const std::string& device_id,
bool should_update_name,
const std::u16string& device_name,
bool is_gatt_connected,
bool is_paired,
int signal_strength_level) { … }
void BluetoothChooserController::RemoveDevice(const std::string& device_id) { … }
void BluetoothChooserController::ResetEventHandler() { … }
base::WeakPtr<BluetoothChooserController>
BluetoothChooserController::GetWeakPtr() { … }
void BluetoothChooserController::ClearAllDevices() { … }
bool BluetoothChooserController::ShouldShowAdapterOffView() const { … }
int BluetoothChooserController::GetAdapterOffMessageId() const { … }
int BluetoothChooserController::GetTurnAdapterOnLinkTextMessageId() const { … }
bool BluetoothChooserController::ShouldShowAdapterUnauthorizedView() const { … }
int BluetoothChooserController::GetBluetoothUnauthorizedMessageId() const { … }
int BluetoothChooserController::GetAuthorizeBluetoothLinkTextMessageId() const { … }
}