diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-24 15:47:15 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-24 15:47:15 +0000 |
commit | 2aa4813399513f20f6ec95130aa6c4716ca05bb5 (patch) | |
tree | 1a1d6498f37b4d08b8eba875f4da348c65d66e4f /ash | |
parent | 67d41842d49d372d03ca66e357c2b308e71f1217 (diff) | |
download | chromium_src-2aa4813399513f20f6ec95130aa6c4716ca05bb5.zip chromium_src-2aa4813399513f20f6ec95130aa6c4716ca05bb5.tar.gz chromium_src-2aa4813399513f20f6ec95130aa6c4716ca05bb5.tar.bz2 |
ash: Some code-cleanup in the system-tray code.
Move the remaining status-area code into system-tray.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10140017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/ash.gyp | 4 | ||||
-rw-r--r-- | ash/focus_cycler_unittest.cc | 49 | ||||
-rw-r--r-- | ash/shell.cc | 72 | ||||
-rw-r--r-- | ash/shell.h | 6 | ||||
-rw-r--r-- | ash/status_area/status_area_view.cc (renamed from ash/system/tray/system_tray_widget_delegate.cc) | 26 | ||||
-rw-r--r-- | ash/status_area/status_area_view.h (renamed from ash/system/tray/system_tray_widget_delegate.h) | 6 | ||||
-rw-r--r-- | ash/system/network/tray_network.cc | 30 | ||||
-rw-r--r-- | ash/system/tray/system_tray.cc | 81 | ||||
-rw-r--r-- | ash/system/tray/system_tray.h | 13 |
9 files changed, 132 insertions, 155 deletions
diff --git a/ash/ash.gyp b/ash/ash.gyp index 3d774e4..5eb5c8a 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -117,6 +117,8 @@ 'shell_delegate.h', 'shell_factory.h', 'shell_window_ids.h', + 'status_area/status_area_view.cc', + 'status_area/status_area_view.h', 'system/audio/audio_observer.h', 'system/audio/tray_volume.cc', 'system/audio/tray_volume.h', @@ -150,8 +152,6 @@ 'system/tray/system_tray_delegate.h', 'system/tray/system_tray_item.cc', 'system/tray/system_tray_item.h', - 'system/tray/system_tray_widget_delegate.cc', - 'system/tray/system_tray_widget_delegate.h', 'system/tray/tray_constants.cc', 'system/tray/tray_constants.h', 'system/tray/tray_empty.cc', diff --git a/ash/focus_cycler_unittest.cc b/ash/focus_cycler_unittest.cc index 9f3e429..23468f3 100644 --- a/ash/focus_cycler_unittest.cc +++ b/ash/focus_cycler_unittest.cc @@ -7,8 +7,7 @@ #include "ash/launcher/launcher.h" #include "ash/shell.h" #include "ash/shell_window_ids.h" -#include "ash/system/tray/system_tray.h" -#include "ash/system/tray/system_tray_widget_delegate.h" +#include "ash/status_area/status_area_view.h" #include "ash/wm/window_util.h" #include "ash/test/ash_test_base.h" #include "ash/shell_factory.h" @@ -31,12 +30,6 @@ internal::StatusAreaView* GetStatusAreaView(views::Widget* widget) { widget->GetContentsView()); } -SystemTray* CreateSystemTray() { - SystemTray* tray = new SystemTray; - tray->CreateWidget(); - return tray; -} - } // namespace typedef AshTestBase FocusCyclerTest; @@ -61,10 +54,10 @@ TEST_F(FocusCyclerTest, CycleFocusForward) { scoped_ptr<FocusCycler> focus_cycler(new FocusCycler()); // Add the Status area - scoped_ptr<SystemTray> tray(CreateSystemTray()); - ASSERT_TRUE(tray->widget()); - focus_cycler->AddWidget(tray->widget()); - GetStatusAreaView(tray->widget())->SetFocusCyclerForTesting( + views::Widget* status_widget = internal::CreateStatusArea(NULL); + ASSERT_TRUE(status_widget); + focus_cycler->AddWidget(status_widget); + GetStatusAreaView(status_widget)->SetFocusCyclerForTesting( focus_cycler.get()); // Add the launcher @@ -84,7 +77,7 @@ TEST_F(FocusCyclerTest, CycleFocusForward) { // Cycle focus to the status area focus_cycler->RotateFocus(FocusCycler::FORWARD); - EXPECT_TRUE(tray->widget()->IsActive()); + EXPECT_TRUE(status_widget->IsActive()); // Cycle focus to the launcher focus_cycler->RotateFocus(FocusCycler::FORWARD); @@ -99,10 +92,10 @@ TEST_F(FocusCyclerTest, CycleFocusBackward) { scoped_ptr<FocusCycler> focus_cycler(new FocusCycler()); // Add the Status area - scoped_ptr<SystemTray> tray(CreateSystemTray()); - ASSERT_TRUE(tray->widget()); - focus_cycler->AddWidget(tray->widget()); - GetStatusAreaView(tray->widget())->SetFocusCyclerForTesting( + views::Widget* status_widget = internal::CreateStatusArea(NULL); + ASSERT_TRUE(status_widget); + focus_cycler->AddWidget(status_widget); + GetStatusAreaView(status_widget)->SetFocusCyclerForTesting( focus_cycler.get()); // Add the launcher @@ -126,7 +119,7 @@ TEST_F(FocusCyclerTest, CycleFocusBackward) { // Cycle focus to the status area focus_cycler->RotateFocus(FocusCycler::BACKWARD); - EXPECT_TRUE(tray->widget()->IsActive()); + EXPECT_TRUE(status_widget->IsActive()); // Cycle focus to the browser focus_cycler->RotateFocus(FocusCycler::BACKWARD); @@ -168,10 +161,10 @@ TEST_F(FocusCyclerLauncherTest, CycleFocusForwardInvisible) { scoped_ptr<FocusCycler> focus_cycler(new FocusCycler()); // Add the Status area - scoped_ptr<SystemTray> tray(CreateSystemTray()); - ASSERT_TRUE(tray->widget()); - focus_cycler->AddWidget(tray->widget()); - GetStatusAreaView(tray->widget())->SetFocusCyclerForTesting( + views::Widget* status_widget = internal::CreateStatusArea(NULL); + ASSERT_TRUE(status_widget); + focus_cycler->AddWidget(status_widget); + GetStatusAreaView(status_widget)->SetFocusCyclerForTesting( focus_cycler.get()); // Add the launcher @@ -191,7 +184,7 @@ TEST_F(FocusCyclerLauncherTest, CycleFocusForwardInvisible) { // Cycle focus to the status area focus_cycler->RotateFocus(FocusCycler::FORWARD); - EXPECT_TRUE(tray->widget()->IsActive()); + EXPECT_TRUE(status_widget->IsActive()); // Cycle focus to the browser focus_cycler->RotateFocus(FocusCycler::FORWARD); @@ -202,10 +195,10 @@ TEST_F(FocusCyclerLauncherTest, CycleFocusBackwardInvisible) { scoped_ptr<FocusCycler> focus_cycler(new FocusCycler()); // Add the Status area - scoped_ptr<SystemTray> tray(CreateSystemTray()); - ASSERT_TRUE(tray->widget()); - focus_cycler->AddWidget(tray->widget()); - GetStatusAreaView(tray->widget())->SetFocusCyclerForTesting( + views::Widget* status_widget = internal::CreateStatusArea(NULL); + ASSERT_TRUE(status_widget); + focus_cycler->AddWidget(status_widget); + GetStatusAreaView(status_widget)->SetFocusCyclerForTesting( focus_cycler.get()); // Add the launcher @@ -225,7 +218,7 @@ TEST_F(FocusCyclerLauncherTest, CycleFocusBackwardInvisible) { // Cycle focus to the status area focus_cycler->RotateFocus(FocusCycler::BACKWARD); - EXPECT_TRUE(tray->widget()->IsActive()); + EXPECT_TRUE(status_widget->IsActive()); // Cycle focus to the browser focus_cycler->RotateFocus(FocusCycler::BACKWARD); diff --git a/ash/shell.cc b/ash/shell.cc index 83b7aac..e985684 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -22,10 +22,23 @@ #include "ash/shell_delegate.h" #include "ash/shell_factory.h" #include "ash/shell_window_ids.h" -#include "ash/system/bluetooth/bluetooth_observer.h" -#include "ash/system/network/network_observer.h" +#include "ash/system/audio/tray_volume.h" +#include "ash/system/bluetooth/tray_bluetooth.h" +#include "ash/system/brightness/tray_brightness.h" +#include "ash/system/date/tray_date.h" +#include "ash/system/ime/tray_ime.h" +#include "ash/system/network/tray_network.h" +#include "ash/system/power/power_status_observer.h" +#include "ash/system/power/power_supply_status.h" +#include "ash/system/power/tray_power.h" +#include "ash/system/settings/tray_settings.h" #include "ash/system/tray/system_tray.h" #include "ash/system/tray/system_tray_delegate.h" +#include "ash/system/tray/tray_empty.h" +#include "ash/system/tray_accessibility.h" +#include "ash/system/tray_caps_lock.h" +#include "ash/system/tray_update.h" +#include "ash/system/user/tray_user.h" #include "ash/tooltips/tooltip_controller.h" #include "ash/wm/activation_controller.h" #include "ash/wm/base_layout_manager.h" @@ -517,7 +530,8 @@ Shell::Shell(ShellDelegate* delegate) delegate_(delegate), shelf_(NULL), panel_layout_manager_(NULL), - root_window_layout_(NULL) { + root_window_layout_(NULL), + status_widget_(NULL) { gfx::Screen::SetInstance(screen_); ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get())); } @@ -667,13 +681,55 @@ void Shell::Init() { CommandLine* command_line = CommandLine::ForCurrentProcess(); + // TODO(sad): All of these initialization should happen in SystemTray. tray_.reset(new SystemTray()); if (delegate_.get()) tray_delegate_.reset(delegate_->CreateSystemTrayDelegate(tray_.get())); if (!tray_delegate_.get()) tray_delegate_.reset(new DummySystemTrayDelegate()); - tray_->CreateItems(); - tray_->CreateWidget(); + + internal::TrayVolume* tray_volume = new internal::TrayVolume(); + internal::TrayBluetooth* tray_bluetooth = new internal::TrayBluetooth(); + internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); + internal::TrayDate* tray_date = new internal::TrayDate(); + internal::TrayPower* tray_power = new internal::TrayPower(); + internal::TrayNetwork* tray_network = new internal::TrayNetwork; + internal::TrayUser* tray_user = new internal::TrayUser; + internal::TrayAccessibility* tray_accessibility = + new internal::TrayAccessibility; + internal::TrayCapsLock* tray_caps_lock = new internal::TrayCapsLock; + internal::TrayIME* tray_ime = new internal::TrayIME; + internal::TrayUpdate* tray_update = new internal::TrayUpdate; + + tray_->accessibility_observer_ = tray_accessibility; + tray_->audio_observer_ = tray_volume; + tray_->bluetooth_observer_ = tray_bluetooth; + tray_->brightness_observer_ = tray_brightness; + tray_->caps_lock_observer_ = tray_caps_lock; + tray_->clock_observer_ = tray_date; + tray_->ime_observer_ = tray_ime; + tray_->network_observer_ = tray_network; + tray_->power_status_observer_ = tray_power; + tray_->update_observer_ = tray_update; + tray_->user_observer_ = tray_user; + + tray_->AddTrayItem(tray_user); + tray_->AddTrayItem(new internal::TrayEmpty()); + tray_->AddTrayItem(tray_power); + tray_->AddTrayItem(tray_network); + tray_->AddTrayItem(tray_bluetooth); + tray_->AddTrayItem(tray_ime); + tray_->AddTrayItem(tray_volume); + tray_->AddTrayItem(tray_brightness); + tray_->AddTrayItem(tray_update); + tray_->AddTrayItem(new internal::TraySettings()); + tray_->AddTrayItem(tray_accessibility); + tray_->AddTrayItem(tray_caps_lock); + tray_->AddTrayItem(tray_date); + tray_->SetVisible(tray_delegate_->GetTrayVisibilityOnStartup()); + + // TODO(sad): Replace uses of status_widget_ with tray_->GetWidget(). + status_widget_ = internal::CreateStatusArea(tray_.get()); // This controller needs to be set before SetupManagedWindowMode. desktop_background_controller_.reset(new DesktopBackgroundController); @@ -690,7 +746,7 @@ void Shell::Init() { } focus_cycler_.reset(new internal::FocusCycler()); - focus_cycler_->AddWidget(tray_->widget()); + focus_cycler_->AddWidget(status_widget_); if (!delegate_.get() || delegate_->IsUserLoggedIn()) CreateLauncher(); @@ -858,10 +914,10 @@ bool Shell::IsInMaximizedMode() const { void Shell::InitLayoutManagers() { DCHECK(root_window_layout_); - DCHECK(tray_->widget()); + DCHECK(status_widget_); internal::ShelfLayoutManager* shelf_layout_manager = - new internal::ShelfLayoutManager(tray_->widget()); + new internal::ShelfLayoutManager(status_widget_); GetContainer(internal::kShellWindowId_LauncherContainer)-> SetLayoutManager(shelf_layout_manager); shelf_ = shelf_layout_manager; diff --git a/ash/shell.h b/ash/shell.h index 74ff8fc..56a12c3 100644 --- a/ash/shell.h +++ b/ash/shell.h @@ -365,7 +365,11 @@ class ASH_EXPORT Shell { // Owned by aura::RootWindow, cached here for type safety. internal::RootWindowLayoutManager* root_window_layout_; - // System tray with clock, Wi-Fi signal, etc. + // Status area with clock, Wi-Fi signal, etc. + views::Widget* status_widget_; + + // System tray with clock, Wi-Fi signal, etc. (a replacement in progress for + // |status_widget_|). scoped_ptr<SystemTray> tray_; // Used by ash/shell. diff --git a/ash/system/tray/system_tray_widget_delegate.cc b/ash/status_area/status_area_view.cc index acc937a..7e1478f 100644 --- a/ash/system/tray/system_tray_widget_delegate.cc +++ b/ash/status_area/status_area_view.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/system/tray/system_tray_widget_delegate.h" +#include "ash/status_area/status_area_view.h" #include "ash/ash_export.h" #include "ash/focus_cycler.h" @@ -65,5 +65,29 @@ bool StatusAreaView::CanActivate() const { void StatusAreaView::DeleteDelegate() { } +ASH_EXPORT views::Widget* CreateStatusArea(views::View* contents) { + if (!contents) { + contents = new views::View; + contents->set_focusable(true); + } + StatusAreaView* status_area_view = new StatusAreaView; + views::Widget* widget = new views::Widget; + views::Widget::InitParams params( + views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); + gfx::Size ps = contents->GetPreferredSize(); + params.bounds = gfx::Rect(0, 0, ps.width(), ps.height()); + params.delegate = status_area_view; + params.parent = Shell::GetInstance()->GetContainer( + ash::internal::kShellWindowId_StatusContainer); + params.transparent = true; + widget->Init(params); + widget->set_focus_on_creation(false); + status_area_view->AddChildView(contents); + widget->SetContentsView(status_area_view); + widget->Show(); + widget->GetNativeView()->SetName("StatusAreaView"); + return widget; +} + } // namespace internal } // namespace ash diff --git a/ash/system/tray/system_tray_widget_delegate.h b/ash/status_area/status_area_view.h index 1834afd..9046573 100644 --- a/ash/system/tray/system_tray_widget_delegate.h +++ b/ash/status_area/status_area_view.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_SYSTEM_TRAY_SYSTEM_TRAY_WIDGET_DELEGATE_H_ -#define ASH_SYSTEM_TRAY_SYSTEM_TRAY_WIDGET_DELEGATE_H_ +#ifndef ASH_STATUS_AREA_STATUS_AREA_VIEW_H_ +#define ASH_STATUS_AREA_STATUS_AREA_VIEW_H_ #pragma once #include "ash/ash_export.h" @@ -46,4 +46,4 @@ class ASH_EXPORT StatusAreaView : public views::WidgetDelegate, } // namespace internal } // namespace ash -#endif // ASH_SYSTEM_TRAY_SYSTEM_TRAY_WIDGET_DELEGATE_H_ +#endif // ASH_STATUS_AREA_STATUS_AREA_VIEW_H_ diff --git a/ash/system/network/tray_network.cc b/ash/system/network/tray_network.cc index 1dd542b..f3aedef 100644 --- a/ash/system/network/tray_network.cc +++ b/ash/system/network/tray_network.cc @@ -379,24 +379,17 @@ class NetworkDetailedView : public views::View, } void ToggleInfoBubble() { - if (ResetInfoBubble()) + if (info_bubble_) { + info_bubble_->GetWidget()->CloseNow(); + info_bubble_ = NULL; return; - + } info_bubble_ = new NonActivatableSettingsBubble( info_icon_, CreateNetworkInfoView()); views::BubbleDelegateView::CreateBubble(info_bubble_); info_bubble_->Show(); } - // Returns whether an existing info-bubble was closed. - bool ResetInfoBubble() { - if (!info_bubble_) - return false; - info_bubble_->GetWidget()->Close(); - info_bubble_ = NULL; - return true; - } - // Overridden from views::View. virtual void Layout() OVERRIDE { views::View::Layout(); @@ -417,15 +410,9 @@ class NetworkDetailedView : public views::View, const views::Event& event) OVERRIDE { ash::SystemTrayDelegate* delegate = ash::Shell::GetInstance()->tray_delegate(); - if (sender == info_icon_) { + if (sender == info_icon_) ToggleInfoBubble(); - return; - } - - // If the info bubble was visible, close it when some other item is clicked - // on. - ResetInfoBubble(); - if (sender == button_wifi_) + else if (sender == button_wifi_) delegate->ToggleWifi(); else if (sender == button_cellular_) delegate->ToggleCellular(); @@ -447,7 +434,10 @@ class NetworkDetailedView : public views::View, ash::Shell::GetInstance()->tray_delegate(); // If the info bubble was visible, close it when some other item is clicked // on. - ResetInfoBubble(); + if (info_bubble_) { + info_bubble_->GetWidget()->Close(); + info_bubble_ = NULL; + } if (sender == header_text_) Shell::GetInstance()->tray()->ShowDefaultView(); diff --git a/ash/system/tray/system_tray.cc b/ash/system/tray/system_tray.cc index 6fa88820..5870e55 100644 --- a/ash/system/tray/system_tray.cc +++ b/ash/system/tray/system_tray.cc @@ -7,25 +7,9 @@ #include "ash/shell.h" #include "ash/shell/panel_window.h" #include "ash/shell_window_ids.h" -#include "ash/system/audio/tray_volume.h" -#include "ash/system/bluetooth/tray_bluetooth.h" -#include "ash/system/brightness/tray_brightness.h" -#include "ash/system/date/tray_date.h" -#include "ash/system/ime/tray_ime.h" -#include "ash/system/network/tray_network.h" -#include "ash/system/power/power_status_observer.h" -#include "ash/system/power/power_supply_status.h" -#include "ash/system/power/tray_power.h" -#include "ash/system/settings/tray_settings.h" -#include "ash/system/tray/tray_empty.h" #include "ash/system/tray/tray_constants.h" #include "ash/system/tray/system_tray_delegate.h" #include "ash/system/tray/system_tray_item.h" -#include "ash/system/tray/system_tray_widget_delegate.h" -#include "ash/system/tray_accessibility.h" -#include "ash/system/tray_caps_lock.h" -#include "ash/system/tray_update.h" -#include "ash/system/user/tray_user.h" #include "ash/system/user/login_status.h" #include "ash/wm/shadow_types.h" #include "ash/wm/shelf_layout_manager.h" @@ -422,7 +406,6 @@ SystemTray::SystemTray() power_status_observer_(NULL), update_observer_(NULL), user_observer_(NULL), - widget_(NULL), bubble_(NULL), popup_(NULL), background_(new internal::SystemTrayBackground), @@ -459,70 +442,6 @@ SystemTray::~SystemTray() { popup_->CloseNow(); } -void SystemTray::CreateItems() { - internal::TrayVolume* tray_volume = new internal::TrayVolume(); - internal::TrayBluetooth* tray_bluetooth = new internal::TrayBluetooth(); - internal::TrayBrightness* tray_brightness = new internal::TrayBrightness(); - internal::TrayDate* tray_date = new internal::TrayDate(); - internal::TrayPower* tray_power = new internal::TrayPower(); - internal::TrayNetwork* tray_network = new internal::TrayNetwork; - internal::TrayUser* tray_user = new internal::TrayUser; - internal::TrayAccessibility* tray_accessibility = - new internal::TrayAccessibility; - internal::TrayCapsLock* tray_caps_lock = new internal::TrayCapsLock; - internal::TrayIME* tray_ime = new internal::TrayIME; - internal::TrayUpdate* tray_update = new internal::TrayUpdate; - - accessibility_observer_ = tray_accessibility; - audio_observer_ = tray_volume; - bluetooth_observer_ = tray_bluetooth; - brightness_observer_ = tray_brightness; - caps_lock_observer_ = tray_caps_lock; - clock_observer_ = tray_date; - ime_observer_ = tray_ime; - network_observer_ = tray_network; - power_status_observer_ = tray_power; - update_observer_ = tray_update; - user_observer_ = tray_user; - - AddTrayItem(tray_user); - AddTrayItem(new internal::TrayEmpty()); - AddTrayItem(tray_power); - AddTrayItem(tray_network); - AddTrayItem(tray_bluetooth); - AddTrayItem(tray_ime); - AddTrayItem(tray_volume); - AddTrayItem(tray_brightness); - AddTrayItem(tray_update); - AddTrayItem(new internal::TraySettings()); - AddTrayItem(tray_accessibility); - AddTrayItem(tray_caps_lock); - AddTrayItem(tray_date); - SetVisible(ash::Shell::GetInstance()->tray_delegate()-> - GetTrayVisibilityOnStartup()); -} - -void SystemTray::CreateWidget() { - if (widget_) - widget_->Close(); - widget_ = new views::Widget; - internal::StatusAreaView* status_area_view = new internal::StatusAreaView; - views::Widget::InitParams params( - views::Widget::InitParams::TYPE_WINDOW_FRAMELESS); - gfx::Size ps = GetPreferredSize(); - params.bounds = gfx::Rect(0, 0, ps.width(), ps.height()); - params.delegate = status_area_view; - params.parent = Shell::GetInstance()->GetContainer( - ash::internal::kShellWindowId_StatusContainer); - params.transparent = true; - widget_->Init(params); - widget_->set_focus_on_creation(false); - status_area_view->AddChildView(this); - widget_->SetContentsView(status_area_view); - widget_->Show(); - widget_->GetNativeView()->SetName("StatusTrayWidget"); -} - void SystemTray::AddTrayItem(SystemTrayItem* item) { items_.push_back(item); diff --git a/ash/system/tray/system_tray.h b/ash/system/tray/system_tray.h index b9dbab2..58049ec 100644 --- a/ash/system/tray/system_tray.h +++ b/ash/system/tray/system_tray.h @@ -49,12 +49,6 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE( SystemTray(); virtual ~SystemTray(); - // Creates the default set of items for the sytem tray. - void CreateItems(); - - // Creates the widget for the tray. - void CreateWidget(); - // Adds a new item in the tray. void AddTrayItem(SystemTrayItem* item); @@ -88,8 +82,6 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE( // Returns true if the launcher should show. bool should_show_launcher() const { return popup_ && should_show_launcher_; } - views::Widget* widget() const { return widget_; } - AccessibilityObserver* accessibility_observer() const { return accessibility_observer_; } @@ -125,6 +117,8 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE( } private: + friend class Shell; + void ShowItems(std::vector<SystemTrayItem*>& items, bool details, bool activate); @@ -170,9 +164,6 @@ class ASH_EXPORT SystemTray : NON_EXPORTED_BASE( UpdateObserver* update_observer_; UserObserver* user_observer_; - // The widget hosting the tray. - views::Widget* widget_; - // The popup widget and the delegate. internal::SystemTrayBubble* bubble_; views::Widget* popup_; |