Commit 17bf7f8e authored by Tetsui Ohkubo's avatar Tetsui Ohkubo Committed by Commit Bot

Unified: Replace WiFi icon badges with new ones.

This CL replaces WiFi badges (e.g. captive portal, or secure network) to
new ones. The icons are specific to ash so they are placed in
ash/resources/vector_icons.

TEST=manual
BUG=876218

Change-Id: I48ee6d99fa6c704576c2f40dc9b0bf79cb5d672d
Reviewed-on: https://chromium-review.googlesource.com/1184727
Commit-Queue: Tetsui Ohkubo <tetsui@chromium.org>
Reviewed-by: default avatarEvan Stade <estade@chromium.org>
Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585741}
parent 98afd4cc
......@@ -216,6 +216,9 @@ aggregate_vector_icons("ash_vector_icons") {
"unified_menu_volume_mute.icon",
"unified_menu_vpn.icon",
"unified_menu_wifi_off.icon",
"unified_network_badge_captive_portal.icon",
"unified_network_badge_secure.icon",
"unified_network_badge_vpn.icon",
"wallpaper.icon",
"window_control_back.icon",
"window_control_dezoom.icon",
......
// Copyright 2018 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, 7,
MOVE_TO, 0, 0,
R_H_LINE_TO, 7,
R_V_LINE_TO, 7,
H_LINE_TO, 0,
V_LINE_TO, 0,
CLOSE,
R_MOVE_TO, 3, 1,
R_V_LINE_TO, 3,
R_H_LINE_TO, 1,
V_LINE_TO, 1,
H_LINE_TO, 3,
CLOSE,
R_MOVE_TO, 0, 4,
R_V_LINE_TO, 1,
R_H_LINE_TO, 1,
V_LINE_TO, 5,
H_LINE_TO, 3,
CLOSE
// Copyright 2018 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, 7,
MOVE_TO, 1, 2,
V_LINE_TO, 0,
R_H_LINE_TO, 4,
R_V_LINE_TO, 2,
R_H_LINE_TO, 1,
R_V_LINE_TO, 5,
H_LINE_TO, 0,
V_LINE_TO, 2,
R_H_LINE_TO, 1,
CLOSE,
R_MOVE_TO, 1, 2,
R_V_LINE_TO, 1,
R_H_LINE_TO, 2,
V_LINE_TO, 4,
H_LINE_TO, 2,
CLOSE,
R_MOVE_TO, 0, -3,
R_V_LINE_TO, 1,
R_H_LINE_TO, 2,
V_LINE_TO, 1,
H_LINE_TO, 2,
CLOSE
// Copyright 2018 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, 7,
MOVE_TO, 4, 4,
H_LINE_TO, 3,
R_V_LINE_TO, 1,
H_LINE_TO, 0,
V_LINE_TO, 2,
R_H_LINE_TO, 3,
R_V_LINE_TO, 1,
R_H_LINE_TO, 3,
R_V_LINE_TO, 1,
H_LINE_TO, 5,
R_V_LINE_TO, 1,
H_LINE_TO, 4,
V_LINE_TO, 4,
CLOSE,
MOVE_TO, 2, 3,
H_LINE_TO, 1,
R_V_LINE_TO, 1,
R_H_LINE_TO, 1,
V_LINE_TO, 3,
CLOSE
......@@ -304,7 +304,8 @@ gfx::ImageSkia ConnectingVpnImage(double animation) {
}
Badge ConnectingVpnBadge(double animation, IconType icon_type) {
return {&kNetworkBadgeVpnIcon,
return {features::IsSystemTrayUnifiedEnabled() ? &kUnifiedNetworkBadgeVpnIcon
: &kNetworkBadgeVpnIcon,
SkColorSetA(GetDefaultColorForIconType(icon_type), 0xFF * animation)};
}
......@@ -499,7 +500,10 @@ bool NetworkIconImpl::UpdateVPNBadge() {
NetworkTypePattern::VPN());
Badge vpn_badge = {};
if (vpn)
vpn_badge = {&kNetworkBadgeVpnIcon, GetDefaultColorForIconType(icon_type_)};
vpn_badge = {features::IsSystemTrayUnifiedEnabled()
? &kUnifiedNetworkBadgeVpnIcon
: &kNetworkBadgeVpnIcon,
GetDefaultColorForIconType(icon_type_)};
if (vpn_badge != vpn_badge_) {
vpn_badge_ = vpn_badge;
return true;
......@@ -515,7 +519,10 @@ void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) {
if (type == shill::kTypeWifi) {
if (network->security_class() != shill::kSecurityNone &&
!IsTrayIcon(icon_type_)) {
badges->bottom_right = {&kNetworkBadgeSecureIcon, icon_color};
badges->bottom_right = {features::IsSystemTrayUnifiedEnabled()
? &kUnifiedNetworkBadgeSecureIcon
: &kNetworkBadgeSecureIcon,
icon_color};
}
} else if (type == shill::kTypeWimax) {
technology_badge_ = {&kNetworkBadgeTechnology4gIcon, icon_color};
......@@ -539,7 +546,10 @@ void NetworkIconImpl::GetBadges(const NetworkState* network, Badges* badges) {
badges->top_left = technology_badge_;
badges->bottom_left = vpn_badge_;
if (behind_captive_portal_)
badges->bottom_right = {&kNetworkBadgeCaptivePortalIcon, icon_color};
badges->bottom_right = {features::IsSystemTrayUnifiedEnabled()
? &kUnifiedNetworkBadgeCaptivePortalIcon
: &kNetworkBadgeCaptivePortalIcon,
icon_color};
}
}
......
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