| OLD | NEW |
| 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/shelf/wm_shelf.h" | 7 #include "ash/common/shelf/wm_shelf.h" |
| 8 #include "ash/common/shell_window_ids.h" | 8 #include "ash/common/shell_window_ids.h" |
| 9 #include "ash/common/system/overview/overview_button_tray.h" | 9 #include "ash/common/system/overview/overview_button_tray.h" |
| 10 #include "ash/common/system/status_area_widget_delegate.h" | 10 #include "ash/common/system/status_area_widget_delegate.h" |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 void StatusAreaWidget::OnMouseEvent(ui::MouseEvent* event) { | 147 void StatusAreaWidget::OnMouseEvent(ui::MouseEvent* event) { |
| 148 Widget::OnMouseEvent(event); | 148 Widget::OnMouseEvent(event); |
| 149 wm_shelf_->UpdateAutoHideForMouseEvent(event); | 149 wm_shelf_->UpdateAutoHideForMouseEvent(event); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void StatusAreaWidget::OnGestureEvent(ui::GestureEvent* event) { | 152 void StatusAreaWidget::OnGestureEvent(ui::GestureEvent* event) { |
| 153 Widget::OnGestureEvent(event); | 153 Widget::OnGestureEvent(event); |
| 154 wm_shelf_->UpdateAutoHideForGestureEvent(event); | 154 wm_shelf_->UpdateAutoHideForGestureEvent(event); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void StatusAreaWidget::UpdateShelfItemBackground(int alpha) { | |
| 158 web_notification_tray_->UpdateShelfItemBackground(alpha); | |
| 159 system_tray_->UpdateShelfItemBackground(alpha); | |
| 160 #if defined(OS_CHROMEOS) | |
| 161 virtual_keyboard_tray_->UpdateShelfItemBackground(alpha); | |
| 162 logout_button_tray_->UpdateShelfItemBackground(alpha); | |
| 163 ime_menu_tray_->UpdateShelfItemBackground(alpha); | |
| 164 palette_tray_->UpdateShelfItemBackground(alpha); | |
| 165 #endif | |
| 166 overview_button_tray_->UpdateShelfItemBackground(alpha); | |
| 167 } | |
| 168 | |
| 169 void StatusAreaWidget::AddSystemTray() { | 157 void StatusAreaWidget::AddSystemTray() { |
| 170 system_tray_ = new SystemTray(wm_shelf_); | 158 system_tray_ = new SystemTray(wm_shelf_); |
| 171 status_area_widget_delegate_->AddTray(system_tray_); | 159 status_area_widget_delegate_->AddTray(system_tray_); |
| 172 } | 160 } |
| 173 | 161 |
| 174 void StatusAreaWidget::AddWebNotificationTray() { | 162 void StatusAreaWidget::AddWebNotificationTray() { |
| 175 DCHECK(system_tray_); | 163 DCHECK(system_tray_); |
| 176 web_notification_tray_ = new WebNotificationTray( | 164 web_notification_tray_ = new WebNotificationTray( |
| 177 wm_shelf_, WmLookup::Get()->GetWindowForWidget(this), system_tray_); | 165 wm_shelf_, WmLookup::Get()->GetWindowForWidget(this), system_tray_); |
| 178 status_area_widget_delegate_->AddTray(web_notification_tray_); | 166 status_area_widget_delegate_->AddTray(web_notification_tray_); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 224 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 237 #if defined(OS_CHROMEOS) | 225 #if defined(OS_CHROMEOS) |
| 238 if (logout_button_tray_) | 226 if (logout_button_tray_) |
| 239 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); | 227 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 240 #endif | 228 #endif |
| 241 if (overview_button_tray_) | 229 if (overview_button_tray_) |
| 242 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); | 230 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 243 } | 231 } |
| 244 | 232 |
| 245 } // namespace ash | 233 } // namespace ash |
| OLD | NEW |