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

Unified Diff: ash/system/tray/tray_background_view.cc

Issue 10878068: Replace Ash web notification tray view with a button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: ash/system/tray/tray_background_view.cc
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index 2a87185cecc0e9ec55bd017e0b04a824920990c1..8456ddc280ffefa0b536cf0663fa9d3fd37e3194 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -152,7 +152,8 @@ void TrayBackgroundView::TrayContainer::UpdateLayout() {
// TrayBackgroundView
TrayBackgroundView::TrayBackgroundView(
- internal::StatusAreaWidget* status_area_widget)
+ internal::StatusAreaWidget* status_area_widget,
+ bool set_background)
: status_area_widget_(status_area_widget),
tray_container_(NULL),
shelf_alignment_(SHELF_ALIGNMENT_BOTTOM),
@@ -171,7 +172,7 @@ TrayBackgroundView::TrayBackgroundView(
internal::BackgroundAnimator::CHANGE_IMMEDIATE);
tray_container_ = new TrayContainer(shelf_alignment_);
- SetContents(tray_container_);
+ SetContents(tray_container_, set_background);
}
TrayBackgroundView::~TrayBackgroundView() {
@@ -235,9 +236,12 @@ void TrayBackgroundView::UpdateBackground(int alpha) {
SchedulePaint();
}
-void TrayBackgroundView::SetContents(views::View* contents) {
- background_ = new internal::TrayBackground;
- contents->set_background(background_);
+void TrayBackgroundView::SetContents(views::View* contents,
+ bool set_background) {
+ if (set_background) {
+ background_ = new internal::TrayBackground;
+ contents->set_background(background_);
+ }
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
AddChildView(contents);

Powered by Google App Engine
This is Rietveld 408576698