| Index: ash/common/system/status_area_widget.cc
|
| diff --git a/ash/common/system/status_area_widget.cc b/ash/common/system/status_area_widget.cc
|
| index 34d04a6f3e4bd30cab675388a4a5d9e3ace9e234..c42e3ebb96017659fe0ea0043602e45bbadf7245 100644
|
| --- a/ash/common/system/status_area_widget.cc
|
| +++ b/ash/common/system/status_area_widget.cc
|
| @@ -20,6 +20,7 @@
|
| #if defined(OS_CHROMEOS)
|
| #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
|
| #include "ash/common/system/chromeos/palette/palette_tray.h"
|
| +#include "ash/common/system/chromeos/palette/palette_utils.h"
|
| #include "ash/common/system/chromeos/session/logout_button_tray.h"
|
| #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
|
| #endif
|
| @@ -133,7 +134,8 @@ void StatusAreaWidget::SchedulePaint() {
|
| virtual_keyboard_tray_->SchedulePaint();
|
| logout_button_tray_->SchedulePaint();
|
| ime_menu_tray_->SchedulePaint();
|
| - palette_tray_->SchedulePaint();
|
| + if (palette_tray_)
|
| + palette_tray_->SchedulePaint();
|
| #endif
|
| overview_button_tray_->SchedulePaint();
|
| }
|
| @@ -151,7 +153,8 @@ void StatusAreaWidget::UpdateShelfItemBackground(int alpha) {
|
| virtual_keyboard_tray_->UpdateShelfItemBackground(alpha);
|
| logout_button_tray_->UpdateShelfItemBackground(alpha);
|
| ime_menu_tray_->UpdateShelfItemBackground(alpha);
|
| - palette_tray_->UpdateShelfItemBackground(alpha);
|
| + if (palette_tray_)
|
| + palette_tray_->UpdateShelfItemBackground(alpha);
|
| #endif
|
| overview_button_tray_->UpdateShelfItemBackground(alpha);
|
| }
|
| @@ -175,8 +178,10 @@ void StatusAreaWidget::AddLogoutButtonTray() {
|
| }
|
|
|
| void StatusAreaWidget::AddPaletteTray() {
|
| - palette_tray_ = new PaletteTray(wm_shelf_);
|
| - status_area_widget_delegate_->AddTray(palette_tray_);
|
| + if (IsPaletteFeatureEnabled()) {
|
| + palette_tray_ = new PaletteTray(wm_shelf_);
|
| + status_area_widget_delegate_->AddTray(palette_tray_);
|
| + }
|
| }
|
|
|
| void StatusAreaWidget::AddVirtualKeyboardTray() {
|
|
|