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

Unified Diff: ash/system/network/tray_network.cc

Issue 9969068: ash: Animate changes in the uber tray. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/network/tray_network.cc
diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc
index 41f5826f64205672e11292bf19ab1d0888eb295f..f3aedef6538addd8e2e24f79570ab035e8da22ea 100644
--- a/ash/system/network/tray_network.cc
+++ b/ash/system/network/tray_network.cc
@@ -10,6 +10,7 @@
#include "ash/system/tray/system_tray_delegate.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_item_more.h"
+#include "ash/system/tray/tray_item_view.h"
#include "ash/system/tray/tray_views.h"
#include "base/utf_string_conversions.h"
#include "grit/ash_strings.h"
@@ -98,7 +99,7 @@ enum ColorTheme {
DARK,
};
-class NetworkTrayView : public views::View {
+class NetworkTrayView : public TrayItemView {
public:
NetworkTrayView(ColorTheme size, bool tray_icon)
: color_theme_(size), tray_icon_(tray_icon) {
@@ -136,8 +137,6 @@ class NetworkDefaultView : public TrayItemMore {
public:
explicit NetworkDefaultView(SystemTrayItem* owner)
: TrayItemMore(owner) {
- icon_ = new NetworkTrayView(DARK, false /* tray_icon */);
- ReplaceIcon(icon_);
Update();
}
@@ -147,14 +146,12 @@ class NetworkDefaultView : public TrayItemMore {
NetworkIconInfo info;
Shell::GetInstance()->tray_delegate()->
GetMostRelevantNetworkIcon(&info, true);
- icon_->Update(info);
+ SetImage(&info.image);
SetLabel(info.description);
SetAccessibleName(info.description);
}
private:
- NetworkTrayView* icon_;
-
DISALLOW_COPY_AND_ASSIGN(NetworkDefaultView);
};
« no previous file with comments | « ash/system/ime/tray_ime.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698