summaryrefslogtreecommitdiffstats
path: root/ash/system
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-22 00:24:46 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-22 00:24:46 +0000
commit2e195f5938e632d3cd7874848d5143d189f37f39 (patch)
tree208de3a892eaf01b303befe8560339a06b327e37 /ash/system
parentd9301f84d817be22d9e51248351145cc3140dea2 (diff)
downloadchromium_src-2e195f5938e632d3cd7874848d5143d189f37f39.zip
chromium_src-2e195f5938e632d3cd7874848d5143d189f37f39.tar.gz
chromium_src-2e195f5938e632d3cd7874848d5143d189f37f39.tar.bz2
Disallow the shelf from hiding when the mouse is between the message bubble and the shelf area.
When a message bubble is open and the user moves the mouse towards the shelf, the shelf will disappear when he crosses the gap between the two elements. This change is extending the shelf between the two when a message is visible. BUG=143178 TEST=unit test & visual Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158066 Review URL: https://chromiumcodereview.appspot.com/10943038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158140 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system')
-rw-r--r--ash/system/status_area_widget.cc6
-rw-r--r--ash/system/status_area_widget.h3
2 files changed, 9 insertions, 0 deletions
diff --git a/ash/system/status_area_widget.cc b/ash/system/status_area_widget.cc
index ec610ab..9370625 100644
--- a/ash/system/status_area_widget.cc
+++ b/ash/system/status_area_widget.cc
@@ -360,6 +360,12 @@ bool StatusAreaWidget::ShouldShowLauncher() const {
web_notification_tray_->IsMouseInNotificationBubble());
}
+bool StatusAreaWidget::IsMessageBubbleShown() const {
+ return ((system_tray_ && system_tray_->IsAnyBubbleVisible()) ||
+ (web_notification_tray_ &&
+ web_notification_tray_->IsMessageCenterBubbleVisible()));
+}
+
void StatusAreaWidget::AddSystemTray(ShellDelegate* shell_delegate) {
system_tray_ = new SystemTray(this);
status_area_widget_delegate_->AddTray(system_tray_);
diff --git a/ash/system/status_area_widget.h b/ash/system/status_area_widget.h
index 4a5e600..26ff2a3 100644
--- a/ash/system/status_area_widget.h
+++ b/ash/system/status_area_widget.h
@@ -74,6 +74,9 @@ class ASH_EXPORT StatusAreaWidget : public views::Widget {
// the launcher to remain visible.
bool ShouldShowLauncher() const;
+ // True if any message bubble is shown.
+ bool IsMessageBubbleShown() const;
+
private:
void AddSystemTray(ShellDelegate* shell_delegate);
void AddWebNotificationTray();