| 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/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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 ? ui::NativeThemeDarkAura::instance() | 174 ? ui::NativeThemeDarkAura::instance() |
| 175 : Widget::GetNativeTheme(); | 175 : Widget::GetNativeTheme(); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) { | 178 void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) { |
| 179 Widget::OnNativeWidgetActivationChanged(active); | 179 Widget::OnNativeWidgetActivationChanged(active); |
| 180 if (active) | 180 if (active) |
| 181 status_area_widget_delegate_->SetPaneFocusAndFocusDefault(); | 181 status_area_widget_delegate_->SetPaneFocusAndFocusDefault(); |
| 182 } | 182 } |
| 183 | 183 |
| 184 void StatusAreaWidget::UpdateShelfItemBackground(int alpha) { | 184 void StatusAreaWidget::UpdateShelfItemBackground(SkColor color) { |
| 185 web_notification_tray_->UpdateShelfItemBackground(alpha); | 185 web_notification_tray_->UpdateShelfItemBackground(color); |
| 186 system_tray_->UpdateShelfItemBackground(alpha); | 186 system_tray_->UpdateShelfItemBackground(color); |
| 187 virtual_keyboard_tray_->UpdateShelfItemBackground(alpha); | 187 virtual_keyboard_tray_->UpdateShelfItemBackground(color); |
| 188 logout_button_tray_->UpdateShelfItemBackground(alpha); | 188 logout_button_tray_->UpdateShelfItemBackground(color); |
| 189 ime_menu_tray_->UpdateShelfItemBackground(alpha); | 189 ime_menu_tray_->UpdateShelfItemBackground(color); |
| 190 if (palette_tray_) | 190 if (palette_tray_) |
| 191 palette_tray_->UpdateShelfItemBackground(alpha); | 191 palette_tray_->UpdateShelfItemBackground(color); |
| 192 overview_button_tray_->UpdateShelfItemBackground(alpha); | 192 overview_button_tray_->UpdateShelfItemBackground(color); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void StatusAreaWidget::AddSystemTray() { | 195 void StatusAreaWidget::AddSystemTray() { |
| 196 system_tray_ = new SystemTray(wm_shelf_); | 196 system_tray_ = new SystemTray(wm_shelf_); |
| 197 status_area_widget_delegate_->AddTray(system_tray_); | 197 status_area_widget_delegate_->AddTray(system_tray_); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void StatusAreaWidget::AddWebNotificationTray() { | 200 void StatusAreaWidget::AddWebNotificationTray() { |
| 201 DCHECK(system_tray_); | 201 DCHECK(system_tray_); |
| 202 web_notification_tray_ = new WebNotificationTray( | 202 web_notification_tray_ = new WebNotificationTray( |
| (...skipping 28 matching lines...) Expand all Loading... |
| 231 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); | 231 ime_menu_tray_ = new ImeMenuTray(wm_shelf_); |
| 232 status_area_widget_delegate_->AddTray(ime_menu_tray_); | 232 status_area_widget_delegate_->AddTray(ime_menu_tray_); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void StatusAreaWidget::AddOverviewButtonTray() { | 235 void StatusAreaWidget::AddOverviewButtonTray() { |
| 236 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); | 236 overview_button_tray_ = new OverviewButtonTray(wm_shelf_); |
| 237 status_area_widget_delegate_->AddTray(overview_button_tray_); | 237 status_area_widget_delegate_->AddTray(overview_button_tray_); |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace ash | 240 } // namespace ash |
| OLD | NEW |