summaryrefslogtreecommitdiffstats
path: root/ash/system/status_area_widget.cc
diff options
context:
space:
mode:
authordmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-12 15:50:44 +0000
committerdmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-12 15:50:44 +0000
commit65e11004319c51eb14787d51102a3db9100da480 (patch)
treea0e38825853e93d28fdbeac9ec176517f6fa8cdf /ash/system/status_area_widget.cc
parent4ab9b0d0ac2a106dfde620c3e7c6144b72621798 (diff)
downloadchromium_src-65e11004319c51eb14787d51102a3db9100da480.zip
chromium_src-65e11004319c51eb14787d51102a3db9100da480.tar.gz
chromium_src-65e11004319c51eb14787d51102a3db9100da480.tar.bz2
Revert of Add a new status area control for Overview Mode. This control is only available (https://codereview.chromium.org/180743016/)
Reason for revert: Somewhat speculative revert. This CL is one of two Ash-related CLs in the range where HideTooltipWhenCursorHidden in ash_unittests started failing: http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%282%29/builds/28144/steps/ash_unittests/logs/HideTooltipWhenCursorHidden This looked most likely to be related to the failure to my untrained eye. Original issue's description: > Add a new status area control for Overview Mode. This control is only available while Maximize Mode is active. > > BUG=337590 > TEST=OverviewModeTrayTest.* > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256420 TBR=flackr@chromium.org,skuhne@chromium.org,oshima@chromium.org,sadrul@chromium.org,jonross@chromium.org NOTREECHECKS=true NOTRY=true BUG=337590 Review URL: https://codereview.chromium.org/196603007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256535 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/status_area_widget.cc')
-rw-r--r--ash/system/status_area_widget.cc30
1 files changed, 10 insertions, 20 deletions
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index 798ea8e..d302efc 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -11,7 +11,6 @@
#include "ash/shell_delegate.h"
#include "ash/shell_window_ids.h"
#include "ash/system/bluetooth/bluetooth_observer.h"
-#include "ash/system/overview/overview_button_tray.h"
#include "ash/system/session/logout_button_tray.h"
#include "ash/system/status_area_widget_delegate.h"
#include "ash/system/tray/system_tray.h"
@@ -34,7 +33,6 @@ const char StatusAreaWidget::kNativeViewName[] = "StatusAreaWidget";
StatusAreaWidget::StatusAreaWidget(aura::Window* status_container)
: status_area_widget_delegate_(new internal::StatusAreaWidgetDelegate),
- overview_button_tray_(NULL),
system_tray_(NULL),
web_notification_tray_(NULL),
logout_button_tray_(NULL),
@@ -57,25 +55,26 @@ StatusAreaWidget::~StatusAreaWidget() {
}
void StatusAreaWidget::CreateTrayViews() {
- AddOverviewButtonTray();
AddSystemTray();
AddWebNotificationTray();
AddLogoutButtonTray();
#if defined(OS_CHROMEOS)
AddVirtualKeyboardTray();
#endif
-
SystemTrayDelegate* delegate =
ash::Shell::GetInstance()->system_tray_delegate();
DCHECK(delegate);
// Initialize after all trays have been created.
- system_tray_->InitializeTrayItems(delegate);
- web_notification_tray_->Initialize();
- logout_button_tray_->Initialize();
+ if (system_tray_)
+ system_tray_->InitializeTrayItems(delegate);
+ if (web_notification_tray_)
+ web_notification_tray_->Initialize();
+ if (logout_button_tray_)
+ logout_button_tray_->Initialize();
#if defined(OS_CHROMEOS)
- virtual_keyboard_tray_->Initialize();
+ if (virtual_keyboard_tray_)
+ virtual_keyboard_tray_->Initialize();
#endif
- overview_button_tray_->Initialize();
UpdateAfterLoginStatusChange(delegate->GetUserLoginStatus());
}
@@ -93,8 +92,6 @@ void StatusAreaWidget::Shutdown() {
delete virtual_keyboard_tray_;
virtual_keyboard_tray_ = NULL;
#endif
- delete overview_button_tray_;
- overview_button_tray_ = NULL;
}
bool StatusAreaWidget::ShouldShowShelf() const {
@@ -109,8 +106,8 @@ bool StatusAreaWidget::ShouldShowShelf() const {
// If the shelf is currently visible, don't hide the shelf if the mouse
// is in any of the notification bubbles.
return (system_tray_ && system_tray_->IsMouseInNotificationBubble()) ||
- (web_notification_tray_ &&
- web_notification_tray_->IsMouseInNotificationBubble());
+ (web_notification_tray_ &&
+ web_notification_tray_->IsMouseInNotificationBubble());
}
bool StatusAreaWidget::IsMessageBubbleShown() const {
@@ -147,11 +144,6 @@ void StatusAreaWidget::AddVirtualKeyboardTray() {
}
#endif
-void StatusAreaWidget::AddOverviewButtonTray() {
- overview_button_tray_ = new OverviewButtonTray(this);
- status_area_widget_delegate_->AddTray(overview_button_tray_);
-}
-
void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
status_area_widget_delegate_->set_alignment(alignment);
if (system_tray_)
@@ -164,8 +156,6 @@ void StatusAreaWidget::SetShelfAlignment(ShelfAlignment alignment) {
if (virtual_keyboard_tray_)
virtual_keyboard_tray_->SetShelfAlignment(alignment);
#endif
- if (overview_button_tray_)
- overview_button_tray_->SetShelfAlignment(alignment);
status_area_widget_delegate_->UpdateLayout();
}