| Index: ash/system/network/tray_network.cc
|
| diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc
|
| index c36b57af24b66ffce1f7cb3235da5325f7a4b47e..8131f4c957528de7e29164a300c6fc0f5749613d 100644
|
| --- a/ash/system/network/tray_network.cc
|
| +++ b/ash/system/network/tray_network.cc
|
| @@ -8,6 +8,7 @@
|
| #include "ash/system/tray/system_tray.h"
|
| #include "ash/system/tray/system_tray_delegate.h"
|
| #include "ash/system/tray/tray_constants.h"
|
| +#include "ash/system/tray/tray_item_more.h"
|
| #include "base/utf_string_conversions.h"
|
| #include "grit/ash_strings.h"
|
| #include "grit/ui_resources.h"
|
| @@ -59,7 +60,7 @@ class ViewClickListener {
|
| virtual void ClickedOn(views::View* sender) = 0;
|
| };
|
|
|
| -class HoverHighlightView : public views::View {
|
| +class HoverHighlightView : public ash::internal::TrayItemMore {
|
| public:
|
| explicit HoverHighlightView(ViewClickListener* listener)
|
| : listener_(listener) {
|
| @@ -81,6 +82,8 @@ class HoverHighlightView : public views::View {
|
| views::Label* label = new views::Label(text);
|
| label->SetFont(label->font().DeriveFont(0, style));
|
| AddChildView(label);
|
| +
|
| + AddMore();
|
| }
|
|
|
| void AddLabel(const string16& text) {
|
| @@ -210,11 +213,6 @@ class NetworkDefaultView : public views::View {
|
| label_ = new views::Label();
|
| AddChildView(label_);
|
|
|
| - more_ = new views::ImageView;
|
| - more_->SetImage(ui::ResourceBundle::GetSharedInstance().GetImageNamed(
|
| - IDR_AURA_UBER_TRAY_MORE).ToSkBitmap());
|
| - AddChildView(more_);
|
| -
|
| Update(Shell::GetInstance()->tray_delegate()->
|
| GetMostRelevantNetworkIcon(true));
|
| }
|
| @@ -228,16 +226,6 @@ class NetworkDefaultView : public views::View {
|
|
|
| private:
|
| // Overridden from views::View.
|
| - virtual void Layout() OVERRIDE {
|
| - // Let the box-layout do the layout first. Then move the '>' arrow to right
|
| - // align.
|
| - views::View::Layout();
|
| -
|
| - gfx::Rect bounds = more_->bounds();
|
| - bounds.set_x(width() - more_->width() - kTrayPopupPaddingBetweenItems);
|
| - more_->SetBoundsRect(bounds);
|
| - }
|
| -
|
| virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE {
|
| owner_->PopupDetailedView(0, true);
|
| return true;
|
| @@ -246,7 +234,6 @@ class NetworkDefaultView : public views::View {
|
| SystemTrayItem* owner_;
|
| NetworkTrayView* icon_;
|
| views::Label* label_;
|
| - views::ImageView* more_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(NetworkDefaultView);
|
| };
|
|
|