Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(379)

Side by Side Diff: ash/common/system/chromeos/network/tray_vpn.cc

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: slight improvement Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/chromeos/network/tray_vpn.h" 5 #include "ash/common/system/chromeos/network/tray_vpn.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/system/chromeos/network/network_icon.h" 9 #include "ash/common/system/chromeos/network/network_icon.h"
10 #include "ash/common/system/chromeos/network/network_icon_animation.h" 10 #include "ash/common/system/chromeos/network/network_icon_animation.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image, 111 void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image,
112 base::string16* label, 112 base::string16* label,
113 bool* animating) { 113 bool* animating) {
114 NetworkStateHandler* handler = 114 NetworkStateHandler* handler =
115 NetworkHandler::Get()->network_state_handler(); 115 NetworkHandler::Get()->network_state_handler();
116 const NetworkState* vpn = 116 const NetworkState* vpn =
117 handler->FirstNetworkByType(NetworkTypePattern::VPN()); 117 handler->FirstNetworkByType(NetworkTypePattern::VPN());
118 if (MaterialDesignController::IsSystemTrayMenuMaterial()) { 118 if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
119 *image = gfx::CreateVectorIcon( 119 *image = gfx::CreateVectorIcon(
120 kNetworkVpnIcon, TrayPopupItemStyle::GetIconColor( 120 kNetworkVpnIcon, TrayPopupItemStyle::GetIconColor(
121 GetNativeTheme(),
122 vpn && vpn->IsConnectedState() 121 vpn && vpn->IsConnectedState()
123 ? TrayPopupItemStyle::ColorStyle::ACTIVE 122 ? TrayPopupItemStyle::ColorStyle::ACTIVE
124 : TrayPopupItemStyle::ColorStyle::INACTIVE)); 123 : TrayPopupItemStyle::ColorStyle::INACTIVE));
125 } else { 124 } else {
126 *image = network_icon::GetVpnImage(); 125 *image = network_icon::GetVpnImage();
127 } 126 }
128 if (!IsVpnConnected()) { 127 if (!IsVpnConnected()) {
129 if (label) { 128 if (label) {
130 *label = 129 *label =
131 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED); 130 l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECTED);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} 202 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {}
204 203
205 void TrayVPN::NetworkStateChanged() { 204 void TrayVPN::NetworkStateChanged() {
206 if (default_) 205 if (default_)
207 default_->Update(); 206 default_->Update();
208 if (detailed_) 207 if (detailed_)
209 detailed_->Update(); 208 detailed_->Update();
210 } 209 }
211 210
212 } // namespace ash 211 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/network_list_md.cc ('k') | ash/common/system/chromeos/network/vpn_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698