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

Side by Side Diff: ash/common/system/tray/tray_background_view.cc

Issue 2254933002: Reuse NativeThemeAuraDark for cros tray. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/tray/tray_background_view.h ('k') | ash/common/system/tray/tray_utils.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/tray/tray_background_view.h" 5 #include "ash/common/system/tray/tray_background_view.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/shelf_constants.h" 8 #include "ash/common/shelf/shelf_constants.h"
9 #include "ash/common/shelf/wm_shelf.h" 9 #include "ash/common/shelf/wm_shelf.h"
10 #include "ash/common/shelf/wm_shelf_util.h" 10 #include "ash/common/shelf/wm_shelf_util.h"
(...skipping 12 matching lines...) Expand all
23 #include "ui/compositor/scoped_layer_animation_settings.h" 23 #include "ui/compositor/scoped_layer_animation_settings.h"
24 #include "ui/events/event_constants.h" 24 #include "ui/events/event_constants.h"
25 #include "ui/gfx/animation/tween.h" 25 #include "ui/gfx/animation/tween.h"
26 #include "ui/gfx/canvas.h" 26 #include "ui/gfx/canvas.h"
27 #include "ui/gfx/geometry/rect.h" 27 #include "ui/gfx/geometry/rect.h"
28 #include "ui/gfx/image/image_skia.h" 28 #include "ui/gfx/image/image_skia.h"
29 #include "ui/gfx/image/image_skia_operations.h" 29 #include "ui/gfx/image/image_skia_operations.h"
30 #include "ui/gfx/nine_image_painter.h" 30 #include "ui/gfx/nine_image_painter.h"
31 #include "ui/gfx/skia_util.h" 31 #include "ui/gfx/skia_util.h"
32 #include "ui/gfx/transform.h" 32 #include "ui/gfx/transform.h"
33 #include "ui/native_theme/native_theme_dark_aura.h"
33 #include "ui/views/background.h" 34 #include "ui/views/background.h"
34 #include "ui/views/layout/box_layout.h" 35 #include "ui/views/layout/box_layout.h"
35 #include "ui/wm/core/window_animations.h" 36 #include "ui/wm/core/window_animations.h"
36 37
37 namespace { 38 namespace {
38 39
39 const int kAnimationDurationForPopupMs = 200; 40 const int kAnimationDurationForPopupMs = 200;
40 41
41 // Duration of opacity animation for visibility changes. 42 // Duration of opacity animation for visibility changes.
42 const int kAnimationDurationForVisibilityMs = 250; 43 const int kAnimationDurationForVisibilityMs = 250;
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 layer()->SetOpacity(0.0f); 314 layer()->SetOpacity(0.0f);
314 layer()->SetVisible(false); 315 layer()->SetVisible(false);
315 HideTransformation(); 316 HideTransformation();
316 } 317 }
317 } 318 }
318 319
319 const char* TrayBackgroundView::GetClassName() const { 320 const char* TrayBackgroundView::GetClassName() const {
320 return kViewClassName; 321 return kViewClassName;
321 } 322 }
322 323
324 const ui::NativeTheme* TrayBackgroundView::GetNativeTheme() const {
325 return ui::NativeThemeDarkAura::instance();
tdanderson 2016/08/17 19:35:00 I would prefer for this were MD-only, i.e., if (M
Evan Stade 2016/08/18 00:38:02 I don't think this is necessary and it's a little
326 }
327
323 void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) { 328 void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) {
324 PreferredSizeChanged(); 329 PreferredSizeChanged();
325 } 330 }
326 331
327 void TrayBackgroundView::GetAccessibleState(ui::AXViewState* state) { 332 void TrayBackgroundView::GetAccessibleState(ui::AXViewState* state) {
328 ActionableView::GetAccessibleState(state); 333 ActionableView::GetAccessibleState(state);
329 state->name = GetAccessibleNameForTray(); 334 state->name = GetAccessibleNameForTray();
330 } 335 }
331 336
332 void TrayBackgroundView::AboutToRequestFocusFromTabTraversal(bool reverse) { 337 void TrayBackgroundView::AboutToRequestFocusFromTabTraversal(bool reverse) {
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 } 507 }
503 508
504 void TrayBackgroundView::UpdateShelfItemBackground(int alpha) { 509 void TrayBackgroundView::UpdateShelfItemBackground(int alpha) {
505 if (background_) { 510 if (background_) {
506 background_->set_alpha(alpha); 511 background_->set_alpha(alpha);
507 SchedulePaint(); 512 SchedulePaint();
508 } 513 }
509 } 514 }
510 515
511 } // namespace ash 516 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_background_view.h ('k') | ash/common/system/tray/tray_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698