| 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 |
| 157 void StatusAreaWidget::AddSystemTray() { | 169 void StatusAreaWidget::AddSystemTray() { |
| 158 system_tray_ = new SystemTray(wm_shelf_); | 170 system_tray_ = new SystemTray(wm_shelf_); |
| 159 status_area_widget_delegate_->AddTray(system_tray_); | 171 status_area_widget_delegate_->AddTray(system_tray_); |
| 160 } | 172 } |
| 161 | 173 |
| 162 void StatusAreaWidget::AddWebNotificationTray() { | 174 void StatusAreaWidget::AddWebNotificationTray() { |
| 163 DCHECK(system_tray_); | 175 DCHECK(system_tray_); |
| 164 web_notification_tray_ = new WebNotificationTray( | 176 web_notification_tray_ = new WebNotificationTray( |
| 165 wm_shelf_, WmLookup::Get()->GetWindowForWidget(this), system_tray_); | 177 wm_shelf_, WmLookup::Get()->GetWindowForWidget(this), system_tray_); |
| 166 status_area_widget_delegate_->AddTray(web_notification_tray_); | 178 status_area_widget_delegate_->AddTray(web_notification_tray_); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); | 236 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); |
| 225 #if defined(OS_CHROMEOS) | 237 #if defined(OS_CHROMEOS) |
| 226 if (logout_button_tray_) | 238 if (logout_button_tray_) |
| 227 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); | 239 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 228 #endif | 240 #endif |
| 229 if (overview_button_tray_) | 241 if (overview_button_tray_) |
| 230 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); | 242 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); |
| 231 } | 243 } |
| 232 | 244 |
| 233 } // namespace ash | 245 } // namespace ash |
| OLD | NEW |