Commit a0ff0ea2 authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Add new icon to supervised user notification.

This CL adds new icon to supervised user notification.
This CL also adds system notification accent color to the notification.

The icon and the accent color are effective only when
chrome://flags/#enable-message-center-new-style-notification
is Enabled (which is ToT default).

TEST=manual
BUG=726241

Change-Id: Ia7b5adb96d6b9cd18ee7973003bc56f45e6381a0
Reviewed-on: https://chromium-review.googlesource.com/662998Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502164}
parent 25487f5e
......@@ -86,6 +86,7 @@ aggregate_vector_icons("ash_vector_icons") {
"notification_screenshare.1x.icon",
"notification_screenshare.icon",
"notification_settings.icon",
"notification_supervised.icon",
"notification_timer.icon",
"palette_action_capture_region.1x.icon",
"palette_action_capture_region.icon",
......
// Copyright 2017 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, 18,
MOVE_TO, 9, 1,
R_CUBIC_TO, 4.42f, 0, 8, 3.58f, 8, 8,
R_CUBIC_TO, 0, 4.42f, -3.58f, 8, -8, 8,
R_CUBIC_TO, -4.42f, 0, -8, -3.58f, -8, -8,
R_CUBIC_TO, 0, -4.42f, 3.58f, -8, 8, -8,
CLOSE,
R_MOVE_TO, 0, 1.6f,
R_CUBIC_TO, -1.1f, 0, -2, 0.9f, -2, 2,
R_CUBIC_TO, 0, 1.1f, 0.9f, 2, 2, 2,
R_CUBIC_TO, 1.1f, 0, 2, -0.9f, 2, -2,
R_CUBIC_TO, 0, -1.1f, -0.9f, -2, -2, -2,
CLOSE,
R_MOVE_TO, 4, 10.58f,
V_LINE_TO, 9.62f,
CUBIC_TO, 13, 8.36f, 10.9f, 7.4f, 9, 7.4f,
R_CUBIC_TO, -1.9f, 0, -4, 0.96f, -4, 2.22f,
R_V_LINE_TO, 3.55f,
R_CUBIC_TO, 0, 0.72f, 0.67f, 1.34f, 1.6f, 1.74f,
R_CUBIC_TO, 0.71f, 0.3f, 1.58f, 0.49f, 2.4f, 0.49f,
R_CUBIC_TO, 0.26f, 0, 0.54f, -0.02f, 0.8f, -0.06f,
R_V_LINE_TO, -1.6f,
R_CUBIC_TO, -0.26f, 0.04f, -0.54f, 0.06f, -0.8f, 0.06f,
R_CUBIC_TO, -0.81f, 0, -1.66f, -0.18f, -2.36f, -0.48f,
R_CUBIC_TO, 0.2f, -0.65f, 1.33f, -1.12f, 2.36f, -1.12f,
R_CUBIC_TO, 0.26f, 0, 0.54f, 0.03f, 0.8f, 0.1f,
R_CUBIC_TO, 0.86f, 0.18f, 1.6f, 0.66f, 1.6f, 1.24f,
R_V_LINE_TO, 1.38f,
R_CUBIC_TO, 0.93f, -0.41f, 1.6f, -1.02f, 1.6f, -1.74f,
CLOSE,
MOVE_TO, 9.25f, 11.5f,
R_CUBIC_TO, -0.69f, 0, -1.25f, -0.56f, -1.25f, -1.25f,
CUBIC_TO_SHORTHAND, 8.56f, 9, 9.25f, 9,
R_CUBIC_TO, 0.69f, 0, 1.25f, 0.56f, 1.25f, 1.25f,
R_CUBIC_TO, 0, 0.69f, -0.56f, 1.25f, -1.25f, 1.25f,
CLOSE,
END
......@@ -92,14 +92,21 @@ void TraySupervisedUser::OnUserSessionUpdated(const AccountId& account_id) {
}
void TraySupervisedUser::CreateOrUpdateNotification() {
std::unique_ptr<Notification> notification(
message_center::Notification::CreateSystemNotification(
kNotificationId, base::string16() /* no title */,
std::unique_ptr<Notification> notification =
system_notifier::CreateSystemNotification(
message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId,
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SUPERVISED_LABEL),
GetSupervisedUserMessage(),
gfx::Image(
gfx::CreateVectorIcon(GetSupervisedUserIcon(), kMenuIconColor)),
system_notifier::kNotifierSupervisedUser,
base::Closure() /* null callback */));
base::string16() /* display_source */, GURL(),
message_center::NotifierId(
message_center::NotifierId::SYSTEM_COMPONENT,
system_notifier::kNotifierSupervisedUser),
message_center::RichNotificationData(), nullptr,
kNotificationSupervisedIcon,
message_center::SystemNotificationWarningLevel::NORMAL);
notification->SetSystemPriority();
// AddNotification does an update if the notification already exists.
MessageCenter::Get()->AddNotification(std::move(notification));
}
......
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