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

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

Issue 1645503004: [exp] ash: sysui for mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ash-in-mus
Patch Set: . Created 4 years, 10 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
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/system/tray/tray_background_view.h" 5 #include "ash/system/tray/tray_background_view.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/screen_util.h" 8 #include "ash/screen_util.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shelf/shelf_widget.h" 10 #include "ash/shelf/shelf_widget.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 ~TrayBackground() override {} 106 ~TrayBackground() override {}
107 107
108 SkColor color() { return color_; } 108 SkColor color() { return color_; }
109 void set_color(SkColor color) { color_ = color; } 109 void set_color(SkColor color) { color_ = color; }
110 void set_alpha(int alpha) { color_ = SkColorSetARGB(alpha, 0, 0, 0); } 110 void set_alpha(int alpha) { color_ = SkColorSetARGB(alpha, 0, 0, 0); }
111 111
112 private: 112 private:
113 ShelfWidget* GetShelfWidget() const { 113 ShelfWidget* GetShelfWidget() const {
114 return RootWindowController::ForWindow(tray_background_view_-> 114 return tray_background_view_->GetShelfLayoutManager()->shelf_widget();
115 status_area_widget()->GetNativeWindow())->shelf();
116 } 115 }
117 116
118 // Overridden from views::Background. 117 // Overridden from views::Background.
119 void Paint(gfx::Canvas* canvas, views::View* view) const override { 118 void Paint(gfx::Canvas* canvas, views::View* view) const override {
120 const int kGridSizeForPainter = 9; 119 const int kGridSizeForPainter = 9;
121 const int kImages[kNumOrientations][kNumStates][kGridSizeForPainter] = { 120 const int kImages[kNumOrientations][kNumStates][kGridSizeForPainter] = {
122 { // Horizontal 121 { // Horizontal
123 IMAGE_GRID_HORIZONTAL(IDR_AURA_TRAY_BG_HORIZ), 122 IMAGE_GRID_HORIZONTAL(IDR_AURA_TRAY_BG_HORIZ),
124 IMAGE_GRID_HORIZONTAL(IDR_AURA_TRAY_BG_HORIZ_ONBLACK), 123 IMAGE_GRID_HORIZONTAL(IDR_AURA_TRAY_BG_HORIZ_ONBLACK),
125 IMAGE_GRID_HORIZONTAL(IDR_AURA_TRAY_BG_HORIZ_PRESSED), 124 IMAGE_GRID_HORIZONTAL(IDR_AURA_TRAY_BG_HORIZ_PRESSED),
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 background_->set_alpha(kTrayBackgroundAlpha); 590 background_->set_alpha(kTrayBackgroundAlpha);
592 SchedulePaint(); 591 SchedulePaint();
593 } 592 }
594 593
595 void TrayBackgroundView::UpdateBubbleViewArrow( 594 void TrayBackgroundView::UpdateBubbleViewArrow(
596 views::TrayBubbleView* bubble_view) { 595 views::TrayBubbleView* bubble_view) {
597 // Nothing to do here. 596 // Nothing to do here.
598 } 597 }
599 598
600 } // namespace ash 599 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698