Commit 756c7b73 authored by Ryan Hansberry's avatar Ryan Hansberry Committed by Commit Bot

[Bluetooth] Pairing system dialog: polish title and height.

Display the dialog title in HTML in order to inherit correct styling
(in a manner consistent with dialogs like InternetConfigDialog), and
set height to 375px, the height of its Settings webui dialog analog.

Bug: 856565
Change-Id: I8b353d849804a4c3066f802fae30a60e33efa60b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1570693Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: Ryan Hansberry <hansberry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#651856}
parent 832a7a94
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
</style> </style>
<bluetooth-dialog id="deviceDialog" no-cancel on-close="onDialogClose_" <bluetooth-dialog id="deviceDialog" no-cancel on-close="onDialogClose_"
pairing-device="[[pairingDevice_]]"> pairing-device="[[pairingDevice_]]"
dialog-title="$i18n{bluetoothPairDeviceTitle}">
</bluetooth-dialog> </bluetooth-dialog>
</template> </template>
<script src="bluetooth_pairing_dialog.js"></script> <script src="bluetooth_pairing_dialog.js"></script>
......
...@@ -21,13 +21,14 @@ namespace chromeos { ...@@ -21,13 +21,14 @@ namespace chromeos {
namespace { namespace {
constexpr int kBluetoothPairingDialogHeight = 350; constexpr int kBluetoothPairingDialogHeight = 375;
void AddBluetoothStrings(content::WebUIDataSource* html_source) { void AddBluetoothStrings(content::WebUIDataSource* html_source) {
struct { struct {
const char* name; const char* name;
int id; int id;
} localized_strings[] = { } localized_strings[] = {
{"bluetoothPairDeviceTitle", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE_TITLE},
{"ok", IDS_OK}, {"ok", IDS_OK},
{"cancel", IDS_CANCEL}, {"cancel", IDS_CANCEL},
{"close", IDS_CLOSE}, {"close", IDS_CLOSE},
...@@ -68,9 +69,8 @@ BluetoothPairingDialog::BluetoothPairingDialog( ...@@ -68,9 +69,8 @@ BluetoothPairingDialog::BluetoothPairingDialog(
const base::string16& name_for_display, const base::string16& name_for_display,
bool paired, bool paired,
bool connected) bool connected)
: SystemWebDialogDelegate( : SystemWebDialogDelegate(GURL(chrome::kChromeUIBluetoothPairingURL),
GURL(chrome::kChromeUIBluetoothPairingURL), base::string16() /* title */),
l10n_util::GetStringUTF16(IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE_TITLE)),
address_(address) { address_(address) {
device_data_.SetString("address", address); device_data_.SetString("address", address);
device_data_.SetString("name", name_for_display); device_data_.SetString("name", name_for_display);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment