Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: ash/common/system/status_area_widget.cc

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: update return type Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/system/status_area_widget.h" 5 #include "ash/common/system/status_area_widget.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" 9 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
10 #include "ash/common/system/chromeos/palette/palette_tray.h" 10 #include "ash/common/system/chromeos/palette/palette_tray.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 (web_notification_tray_ && 136 (web_notification_tray_ &&
137 web_notification_tray_->ShouldBlockShelfAutoHide())) 137 web_notification_tray_->ShouldBlockShelfAutoHide()))
138 return true; 138 return true;
139 139
140 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide()) 140 if (palette_tray_ && palette_tray_->ShouldBlockShelfAutoHide())
141 return true; 141 return true;
142 142
143 if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide()) 143 if (ime_menu_tray_ && ime_menu_tray_->ShouldBlockShelfAutoHide())
144 return true; 144 return true;
145 145
146 if (!wm_shelf_->IsVisible()) 146 return false;
147 return false;
148
149 // If the shelf is currently visible, don't hide the shelf if the mouse
150 // is in any of the notification bubbles.
151 return system_tray_ && system_tray_->IsMouseInNotificationBubble();
152 } 147 }
153 148
154 bool StatusAreaWidget::IsMessageBubbleShown() const { 149 bool StatusAreaWidget::IsMessageBubbleShown() const {
155 return ((system_tray_ && system_tray_->IsAnyBubbleVisible()) || 150 return ((system_tray_ && system_tray_->IsSystemBubbleVisible()) ||
156 (web_notification_tray_ && 151 (web_notification_tray_ &&
157 web_notification_tray_->IsMessageCenterBubbleVisible())); 152 web_notification_tray_->IsMessageCenterBubbleVisible()));
158 } 153 }
159 154
160 void StatusAreaWidget::SchedulePaint() { 155 void StatusAreaWidget::SchedulePaint() {
161 status_area_widget_delegate_->SchedulePaint(); 156 status_area_widget_delegate_->SchedulePaint();
162 web_notification_tray_->SchedulePaint(); 157 web_notification_tray_->SchedulePaint();
163 system_tray_->SchedulePaint(); 158 system_tray_->SchedulePaint();
164 virtual_keyboard_tray_->SchedulePaint(); 159 virtual_keyboard_tray_->SchedulePaint();
165 logout_button_tray_->SchedulePaint(); 160 logout_button_tray_->SchedulePaint();
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); 229 ime_menu_tray_ = new ImeMenuTray(wm_shelf_);
235 status_area_widget_delegate_->AddTray(ime_menu_tray_); 230 status_area_widget_delegate_->AddTray(ime_menu_tray_);
236 } 231 }
237 232
238 void StatusAreaWidget::AddOverviewButtonTray() { 233 void StatusAreaWidget::AddOverviewButtonTray() {
239 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); 234 overview_button_tray_ = new OverviewButtonTray(wm_shelf_);
240 status_area_widget_delegate_->AddTray(overview_button_tray_); 235 status_area_widget_delegate_->AddTray(overview_button_tray_);
241 } 236 }
242 237
243 } // namespace ash 238 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/screen_security/screen_tray_item.cc ('k') | ash/common/system/system_notifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698