| Index: trunk/src/ash/system/chromeos/network/tray_network.cc
|
| ===================================================================
|
| --- trunk/src/ash/system/chromeos/network/tray_network.cc (revision 282838)
|
| +++ trunk/src/ash/system/chromeos/network/tray_network.cc (working copy)
|
| @@ -7,6 +7,7 @@
|
| #include "ash/ash_switches.h"
|
| #include "ash/metrics/user_metrics_recorder.h"
|
| #include "ash/shell.h"
|
| +#include "ash/system/chromeos/network/network_icon_animation.h"
|
| #include "ash/system/chromeos/network/network_state_list_detailed_view.h"
|
| #include "ash/system/chromeos/network/tray_network_state_observer.h"
|
| #include "ash/system/tray/system_tray.h"
|
| @@ -22,12 +23,10 @@
|
| #include "chromeos/network/network_state_handler.h"
|
| #include "grit/ash_resources.h"
|
| #include "grit/ash_strings.h"
|
| -#include "grit/ui_chromeos_strings.h"
|
| #include "third_party/cros_system_api/dbus/service_constants.h"
|
| #include "ui/accessibility/ax_view_state.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| -#include "ui/chromeos/network/network_icon_animation.h"
|
| #include "ui/views/controls/image_view.h"
|
| #include "ui/views/controls/link.h"
|
| #include "ui/views/controls/link_listener.h"
|
| @@ -43,7 +42,7 @@
|
| namespace tray {
|
|
|
| class NetworkTrayView : public TrayItemView,
|
| - public ui::network_icon::AnimationObserver {
|
| + public network_icon::AnimationObserver {
|
| public:
|
| explicit NetworkTrayView(TrayNetwork* network_tray)
|
| : TrayItemView(network_tray),
|
| @@ -58,7 +57,7 @@
|
| }
|
|
|
| virtual ~NetworkTrayView() {
|
| - ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
|
| + network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
|
| }
|
|
|
| virtual const char* GetClassName() const OVERRIDE {
|
| @@ -71,15 +70,14 @@
|
| gfx::ImageSkia image;
|
| base::string16 name;
|
| bool animating = false;
|
| - ui::network_icon::GetDefaultNetworkImageAndLabel(
|
| - ui::network_icon::ICON_TYPE_TRAY, &image, &name, &animating);
|
| + network_icon::GetDefaultNetworkImageAndLabel(
|
| + network_icon::ICON_TYPE_TRAY, &image, &name, &animating);
|
| bool show_in_tray = !image.isNull();
|
| UpdateIcon(show_in_tray, image);
|
| if (animating)
|
| - ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
|
| + network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
|
| else
|
| - ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(
|
| - this);
|
| + network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
|
| // Update accessibility.
|
| const NetworkState* connected_network =
|
| handler->ConnectedNetworkByType(NetworkTypePattern::NonVirtual());
|
| @@ -105,7 +103,7 @@
|
| state->role = ui::AX_ROLE_BUTTON;
|
| }
|
|
|
| - // ui::network_icon::AnimationObserver
|
| + // network_icon::AnimationObserver
|
| virtual void NetworkIconChanged() OVERRIDE {
|
| UpdateNetworkStateHandlerIcon();
|
| }
|
| @@ -140,7 +138,7 @@
|
| };
|
|
|
| class NetworkDefaultView : public TrayItemMore,
|
| - public ui::network_icon::AnimationObserver {
|
| + public network_icon::AnimationObserver {
|
| public:
|
| NetworkDefaultView(TrayNetwork* network_tray, bool show_more)
|
| : TrayItemMore(network_tray, show_more),
|
| @@ -149,26 +147,25 @@
|
| }
|
|
|
| virtual ~NetworkDefaultView() {
|
| - ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
|
| + network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
|
| }
|
|
|
| void Update() {
|
| gfx::ImageSkia image;
|
| base::string16 label;
|
| bool animating = false;
|
| - ui::network_icon::GetDefaultNetworkImageAndLabel(
|
| - ui::network_icon::ICON_TYPE_DEFAULT_VIEW, &image, &label, &animating);
|
| + network_icon::GetDefaultNetworkImageAndLabel(
|
| + network_icon::ICON_TYPE_DEFAULT_VIEW, &image, &label, &animating);
|
| if (animating)
|
| - ui::network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
|
| + network_icon::NetworkIconAnimation::GetInstance()->AddObserver(this);
|
| else
|
| - ui::network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(
|
| - this);
|
| + network_icon::NetworkIconAnimation::GetInstance()->RemoveObserver(this);
|
| SetImage(&image);
|
| SetLabel(label);
|
| SetAccessibleName(label);
|
| }
|
|
|
| - // ui::network_icon::AnimationObserver
|
| + // network_icon::AnimationObserver
|
| virtual void NetworkIconChanged() OVERRIDE {
|
| Update();
|
| }
|
|
|