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

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

Issue 2254933002: Reuse NativeThemeAuraDark for cros tray. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 4 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
« no previous file with comments | « ash/common/system/status_area_widget.h ('k') | ash/common/system/tray/system_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
8 #include "ash/common/shell_window_ids.h" 9 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/system/overview/overview_button_tray.h" 10 #include "ash/common/system/overview/overview_button_tray.h"
10 #include "ash/common/system/status_area_widget_delegate.h" 11 #include "ash/common/system/status_area_widget_delegate.h"
11 #include "ash/common/system/tray/system_tray.h" 12 #include "ash/common/system/tray/system_tray.h"
12 #include "ash/common/system/tray/system_tray_delegate.h" 13 #include "ash/common/system/tray/system_tray_delegate.h"
13 #include "ash/common/system/web_notification/web_notification_tray.h" 14 #include "ash/common/system/web_notification/web_notification_tray.h"
14 #include "ash/common/wm_lookup.h" 15 #include "ash/common/wm_lookup.h"
15 #include "ash/common/wm_root_window_controller.h" 16 #include "ash/common/wm_root_window_controller.h"
16 #include "ash/common/wm_shell.h" 17 #include "ash/common/wm_shell.h"
17 #include "ash/common/wm_window.h" 18 #include "ash/common/wm_window.h"
18 #include "base/i18n/time_formatting.h" 19 #include "base/i18n/time_formatting.h"
20 #include "ui/native_theme/native_theme_dark_aura.h"
19 21
20 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
21 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" 23 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
22 #include "ash/common/system/chromeos/palette/palette_tray.h" 24 #include "ash/common/system/chromeos/palette/palette_tray.h"
23 #include "ash/common/system/chromeos/session/logout_button_tray.h" 25 #include "ash/common/system/chromeos/session/logout_button_tray.h"
24 #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h" 26 #include "ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.h"
25 #endif 27 #endif
26 28
27 namespace ash { 29 namespace ash {
28 30
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 system_tray_->SchedulePaint(); 133 system_tray_->SchedulePaint();
132 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
133 virtual_keyboard_tray_->SchedulePaint(); 135 virtual_keyboard_tray_->SchedulePaint();
134 logout_button_tray_->SchedulePaint(); 136 logout_button_tray_->SchedulePaint();
135 ime_menu_tray_->SchedulePaint(); 137 ime_menu_tray_->SchedulePaint();
136 palette_tray_->SchedulePaint(); 138 palette_tray_->SchedulePaint();
137 #endif 139 #endif
138 overview_button_tray_->SchedulePaint(); 140 overview_button_tray_->SchedulePaint();
139 } 141 }
140 142
143 const ui::NativeTheme* StatusAreaWidget::GetNativeTheme() const {
144 return MaterialDesignController::IsShelfMaterial()
145 ? ui::NativeThemeDarkAura::instance()
146 : Widget::GetNativeTheme();
147 }
148
141 void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) { 149 void StatusAreaWidget::OnNativeWidgetActivationChanged(bool active) {
142 Widget::OnNativeWidgetActivationChanged(active); 150 Widget::OnNativeWidgetActivationChanged(active);
143 if (active) 151 if (active)
144 status_area_widget_delegate_->SetPaneFocusAndFocusDefault(); 152 status_area_widget_delegate_->SetPaneFocusAndFocusDefault();
145 } 153 }
146 154
147 void StatusAreaWidget::UpdateShelfItemBackground(int alpha) { 155 void StatusAreaWidget::UpdateShelfItemBackground(int alpha) {
148 web_notification_tray_->UpdateShelfItemBackground(alpha); 156 web_notification_tray_->UpdateShelfItemBackground(alpha);
149 system_tray_->UpdateShelfItemBackground(alpha); 157 system_tray_->UpdateShelfItemBackground(alpha);
150 #if defined(OS_CHROMEOS) 158 #if defined(OS_CHROMEOS)
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 web_notification_tray_->UpdateAfterLoginStatusChange(login_status); 234 web_notification_tray_->UpdateAfterLoginStatusChange(login_status);
227 #if defined(OS_CHROMEOS) 235 #if defined(OS_CHROMEOS)
228 if (logout_button_tray_) 236 if (logout_button_tray_)
229 logout_button_tray_->UpdateAfterLoginStatusChange(login_status); 237 logout_button_tray_->UpdateAfterLoginStatusChange(login_status);
230 #endif 238 #endif
231 if (overview_button_tray_) 239 if (overview_button_tray_)
232 overview_button_tray_->UpdateAfterLoginStatusChange(login_status); 240 overview_button_tray_->UpdateAfterLoginStatusChange(login_status);
233 } 241 }
234 242
235 } // namespace ash 243 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/status_area_widget.h ('k') | ash/common/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698