Commit aa5b61dc authored by Regan Hsu's avatar Regan Hsu Committed by Commit Bot

[CrOS PhoneHub] Add phone notification description to multidevice setup

Adds another feature line item with icon that Better Together can
mirror notifications from phone to Chromebook.

Screenshot:
https://screenshot.googleplex.com/L4rEXHdAeys

Bug: 1106937
Change-Id: Ib3aa18fbe6c322244c87158b4dcb875e73cc3e69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2353020
Commit-Queue: Regan Hsu <hsuregan@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797931}
parent f2af1ee6
......@@ -210,6 +210,9 @@
<message name="IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_AWM_DESCRIPTION" desc="Description of a feature that shows text messages received by the user's phone as notification on their Chromebook and a link to an information page.">
Send you notifications and default to remembering this computer for Messages. <ph name="LINK_BEGIN">&lt;a href="$1<ex>https://support.google.com/chromebook/?p=messages</ex>"&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message>
<message name="IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_MIRROR_PHONE_NOTIFICATIONS" desc="Tell the user that Better Together can automatically mirror notifications from their phone to their Chromebook.">
Mirror notifications from your phone
</message>
<message name="IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_INSTALL_APPS_DESCRIPTION" desc="Tell the user that Better Together can automatically install apps on their Chromebook">
Automatically install apps
</message>
......
......@@ -4,6 +4,7 @@
#include "chrome/browser/ui/webui/chromeos/multidevice_setup/multidevice_setup_localized_strings_provider.h"
#include "base/feature_list.h"
#include "base/no_destructor.h"
#include "base/strings/utf_string_conversions.h"
#include "base/system/sys_info.h"
......@@ -15,6 +16,7 @@
#include "chrome/grit/generated_resources.h"
#include "chrome/grit/multidevice_setup_resources.h"
#include "chrome/grit/multidevice_setup_resources_map.h"
#include "chromeos/constants/chromeos_features.h"
#include "chromeos/grit/chromeos_resources.h"
#include "chromeos/services/multidevice_setup/public/cpp/url_provider.h"
#include "components/login/localized_values_builder.h"
......@@ -48,6 +50,8 @@ constexpr webui::LocalizedString kLocalizedStringsWithoutPlaceholders[] = {
IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_SINGLE_DEVICE_HEADER},
{"startSetupPageOfflineDeviceOption",
IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_OFFLINE_DEVICE_OPTION},
{"startSetupPageFeatureMirrorPhoneNotifications",
IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_MIRROR_PHONE_NOTIFICATIONS},
{"startSetupPageFeatureListInstallApps",
IDS_MULTIDEVICE_SETUP_START_SETUP_PAGE_INSTALL_APPS_DESCRIPTION},
{"startSetupPageFeatureListAddFeatures",
......@@ -122,6 +126,10 @@ GetLocalizedStringsWithPlaceholders() {
void AddLocalizedStrings(content::WebUIDataSource* html_source) {
AddLocalizedStringsBulk(html_source, kLocalizedStringsWithoutPlaceholders);
html_source->AddBoolean(
"phoneHubEnabled",
base::FeatureList::IsEnabled(chromeos::features::kPhoneHub));
for (const auto& entry : GetLocalizedStringsWithPlaceholders())
html_source->AddString(entry.name, entry.localized_string);
}
......
......@@ -25,6 +25,9 @@
<g id="messages" fill="none" fill-rule="evenodd">
<path d="M16.3107503,3 L3.66666667,3 C2.75,3 2,3.75 2,4.66666667 L2,18.3161621 L5.33333333,15 L16.3107503,15 C17.227417,15 17.977417,14.2328288 17.977417,13.3161621 L17.977417,4.66666667 C17.977417,3.75 17.227417,3 16.3107503,3 Z M16,13 L4,13 L4,5 L16,5 L16,13 Z M6,8 L8,8 L8,10 L6,10 L6,8 Z M9,8 L11,8 L11,10 L9,10 L9,8 Z M12,8 L14,8 L14,10 L12,10 L12,8 Z" fill="#9AA0A6"></path>
</g>
<g id="notifications" fill="none" fill-rule="evenodd">
<path d="M11,3.10001812 C13.2822403,3.56328845 15,5.58104209 15,8 C15,10.7614237 15,13 15,13 L17,13 L17,15 L3,15 L3,13 L5,13 C5,13 5,9.9021552 5,8 C5,5.58104209 6.71775968,3.56328845 9,3.10001812 L9,2.5 C9,1.94771525 9.44771525,1.5 10,1.5 C10.5522847,1.5 11,1.94771525 11,2.5 L11,3.10001812 Z M7,8 L7,13 L13,13 L13,8 C13,6.34314575 11.6568542,5 10,5 C8.34314575,5 7,6.34314575 7,8 Z M10,18 C8.8954305,18 8,17.1045695 8,16 L12,16 C12,17.1045695 11.1045695,18 10,18 Z" fill="#9AA0A6"></path>
</g>
<g id="downloads" fill="none" fill-rule="evenodd">
<path d="M2,13 L4,13 L4,16 L16,16 L16,13 L18,13 L18,16 C18,17.1 17.1,18 16,18 L4,18 C2.9,18 2,17.1 2,16 L2,13 Z M13.59,7.59 L11,10.17 L11,2 L9,2 L9,10.17 L6.41,7.59 L5,9 L10,14 L15,9 L13.59,7.59 Z" fill="#9AA0A6"></path>
</g>
......
......@@ -153,6 +153,15 @@
locale, 'startSetupPageFeatureListAwm')]]">
</span>
</div>
<template is="dom-if" if="[[phoneHubEnabled_]]">
<div class="feature-detail">
<iron-icon icon="multidevice-setup-icons-20:notifications">
</iron-icon>
<span>
[[i18nDynamic(locale, 'startSetupPageFeatureMirrorPhoneNotifications')]]
</span>
</div>
</template>
<div class="feature-detail">
<iron-icon icon="multidevice-setup-icons-20:downloads">
</iron-icon>
......
......@@ -51,6 +51,15 @@ Polymer({
* @type {!multidevice_setup.MultiDeviceSetupDelegate}
*/
delegate: Object,
/** @private */
phoneHubEnabled_: {
type: Boolean,
value() {
return loadTimeData.valueExists('phoneHubEnabled') &&
loadTimeData.getBoolean('phoneHubEnabled');
},
},
},
behaviors: [
......
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