Commit 287097ab authored by Rachel Carpenter's avatar Rachel Carpenter Committed by Commit Bot

Use the Help App name and logo in the Release Notes notification.

Conditional on the feature being enabled.
Icon created following process at
https://chromium.googlesource.com/chromium/src/+/refs/heads/master/components/vector_icons/README.md

Feature enabled:
http://screen/62b743f6-671f-4810-be87-53d1fc2e7a35.png

Feature disabled:
http://screen/PbaSenAign5.png

Change-Id: I2384977b098737a40aff16de23ed8186beab75e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2355352Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Rachel Carpenter <carpenterr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#799904}
parent 553854b5
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/chrome_pages.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "chromeos/constants/chromeos_features.h" #include "chromeos/constants/chromeos_features.h"
#include "chromeos/strings/grit/chromeos_strings.h"
#include "components/vector_icons/vector_icons.h"
#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_service.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/chromeos/devicetype_utils.h" #include "ui/chromeos/devicetype_utils.h"
...@@ -58,16 +60,31 @@ void ReleaseNotesNotification::ShowReleaseNotesNotification() { ...@@ -58,16 +60,31 @@ void ReleaseNotesNotification::ShowReleaseNotesNotification() {
base::string16 message = base::string16 message =
l10n_util::GetStringUTF16(IDS_RELEASE_NOTES_NOTIFICATION_MESSAGE); l10n_util::GetStringUTF16(IDS_RELEASE_NOTES_NOTIFICATION_MESSAGE);
release_notes_available_notification_ = ash::CreateSystemNotification( // We show a different icon and source if this leads to the HelpApp.
message_center::NOTIFICATION_TYPE_SIMPLE, kShowNotificationID, if (base::FeatureList::IsEnabled(chromeos::features::kHelpAppReleaseNotes)) {
std::move(title), std::move(message), base::string16(), GURL(), release_notes_available_notification_ = ash::CreateSystemNotification(
message_center::NotifierId(), message_center::RichNotificationData(), message_center::NOTIFICATION_TYPE_SIMPLE, kShowNotificationID,
base::MakeRefCounted<message_center::HandleNotificationClickDelegate>( std::move(title), std::move(message),
base::BindRepeating( l10n_util::GetStringUTF16(IDS_HELP_APP_EXPLORE), GURL(),
&ReleaseNotesNotification::HandleClickShowNotification, message_center::NotifierId(), message_center::RichNotificationData(),
weak_ptr_factory_.GetWeakPtr())), base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
gfx::VectorIcon(), base::BindRepeating(
message_center::SystemNotificationWarningLevel::NORMAL); &ReleaseNotesNotification::HandleClickShowNotification,
weak_ptr_factory_.GetWeakPtr())),
vector_icons::kNotificationExploreIcon,
message_center::SystemNotificationWarningLevel::NORMAL);
} else {
release_notes_available_notification_ = ash::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kShowNotificationID,
std::move(title), std::move(message), base::string16(), GURL(),
message_center::NotifierId(), message_center::RichNotificationData(),
base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
base::BindRepeating(
&ReleaseNotesNotification::HandleClickShowNotification,
weak_ptr_factory_.GetWeakPtr())),
gfx::VectorIcon(),
message_center::SystemNotificationWarningLevel::NORMAL);
}
SystemNotificationHelper::GetInstance()->Display( SystemNotificationHelper::GetInstance()->Display(
*release_notes_available_notification_); *release_notes_available_notification_);
} }
......
...@@ -57,6 +57,7 @@ aggregate_vector_icons("components_vector_icons") { ...@@ -57,6 +57,7 @@ aggregate_vector_icons("components_vector_icons") {
"media_seek_forward.icon", "media_seek_forward.icon",
"mic.icon", "mic.icon",
"midi.icon", "midi.icon",
"notification_explore.icon",
"notifications.icon", "notifications.icon",
"notifications_off.icon", "notifications_off.icon",
"open_in_new.icon", "open_in_new.icon",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 36,
PATH_COLOR_ARGB, 0xFF, 0xFF, 0xFF, 0xFF,
MOVE_TO, 0, 0,
R_H_LINE_TO, 36,
R_V_LINE_TO, 36,
H_LINE_TO, 0,
CLOSE,
NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0x1A, 0x73, 0xE8,
CIRCLE, 18, 18, 16.453,
NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0xFF, 0xFF, 0xFF,
MOVE_TO, 9.05f, 9.05f,
R_CUBIC_TO, -1.59f, 1.59f, -0.13f, 5.7f, 1.99f, 7.82f,
R_LINE_TO, 9.81f, 9.81f,
R_LINE_TO, 5.84f, -5.84f,
R_LINE_TO, -9.81f, -9.81f,
R_CUBIC_TO, -2.12f, -2.12f, -6.23f, -3.58f, -7.82f, -1.99f,
CLOSE,
NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0xAE, 0xCB, 0xFA,
MOVE_TO, 12.81f, 26.6f,
R_ARC_TO, 1.5f, 1.5f, 0, 0, 1, -0.44f, -1.06f,
V_LINE_TO, 18.2f,
R_LINE_TO, 8.49f, 8.49f,
R_LINE_TO, -2.92f, 2.92f,
R_ARC_TO, 1.5f, 1.5f, 0, 0, 1, -2.12f, 0,
R_LINE_TO, -3.01f, -3.01f,
CLOSE,
NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0xAE, 0xCB, 0xFA,
MOVE_TO, 26.6f, 12.81f,
R_ARC_TO, 1.5f, 1.5f, 0, 0, 0, -1.06f, -0.44f,
H_LINE_TO, 18.2f,
R_LINE_TO, 8.49f, 8.49f,
R_LINE_TO, 2.92f, -2.92f,
R_ARC_TO, 1.5f, 1.5f, 0, 0, 0, 0, -2.12f,
R_LINE_TO, -3.01f, -3.01f,
CLOSE,
NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0x1A, 0x73, 0xE8,
CIRCLE, 13.03, 13.03, 1.688,
NEW_PATH,
PATH_COLOR_ARGB, 0xFF, 0xAE, 0xCB, 0xFA,
MOVE_TO, 18.35f, 20.2f,
R_LINE_TO, 0.01f, 0.01f,
R_LINE_TO, 0.01f, 0.01f,
R_LINE_TO, 4.86f, 4.87f,
R_ARC_TO, 1.31f, 1.31f, 0, 1, 0, 1.87f, -1.85f,
R_LINE_TO, -4.94f, -4.94f,
R_LINE_TO, 0, 0,
R_ARC_TO, 1.31f, 1.31f, 0, 0, 0, -1.85f, 1.85f,
R_LINE_TO, 0, 0,
R_LINE_TO, 0.05f, 0.04f,
CLOSE
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