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

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

Issue 2228183002: Updates to icons for Ash material design system tray (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: const ref Created 4 years, 4 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/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h" 8 #include "ash/common/system/chromeos/network/network_state_list_detailed_view.h"
9 #include "ash/common/system/chromeos/network/vpn_delegate.h" 9 #include "ash/common/system/chromeos/network/vpn_delegate.h"
10 #include "ash/common/system/tray/system_tray.h" 10 #include "ash/common/system/tray/system_tray.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void Update() { 64 void Update() {
65 gfx::ImageSkia image; 65 gfx::ImageSkia image;
66 base::string16 label; 66 base::string16 label;
67 bool animating = false; 67 bool animating = false;
68 GetNetworkStateHandlerImageAndLabel(&image, &label, &animating); 68 GetNetworkStateHandlerImageAndLabel(&image, &label, &animating);
69 if (animating) 69 if (animating)
70 ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this); 70 ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
71 else 71 else
72 ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver( 72 ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(
73 this); 73 this);
74 SetImage(&image); 74 SetImage(image);
75 SetLabel(label); 75 SetLabel(label);
76 SetAccessibleName(label); 76 SetAccessibleName(label);
77 } 77 }
78 78
79 // ui::network_icon::AnimationObserver 79 // ui::network_icon::AnimationObserver
80 void NetworkIconChanged() override { Update(); } 80 void NetworkIconChanged() override { Update(); }
81 81
82 private: 82 private:
83 void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image, 83 void GetNetworkStateHandlerImageAndLabel(gfx::ImageSkia* image,
84 base::string16* label, 84 base::string16* label,
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {} 169 void TrayVPN::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) {}
170 170
171 void TrayVPN::NetworkStateChanged() { 171 void TrayVPN::NetworkStateChanged() {
172 if (default_) 172 if (default_)
173 default_->Update(); 173 default_->Update();
174 if (detailed_) 174 if (detailed_)
175 detailed_->Update(); 175 detailed_->Update();
176 } 176 }
177 177
178 } // namespace ash 178 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/network/tray_sms.cc ('k') | ash/common/system/chromeos/screen_security/screen_capture_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698