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

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

Issue 14305026: ash: Remove use of ALLOW_THIS_IN_INITIALIZER_LIST. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/tray/test_system_tray_delegate.cc ('k') | ash/wm/activation_controller.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/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_ash.h" 8 #include "ash/screen_ash.h"
9 #include "ash/shelf/shelf_layout_manager.h" 9 #include "ash/shelf/shelf_layout_manager.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 //////////////////////////////////////////////////////////////////////////////// 160 ////////////////////////////////////////////////////////////////////////////////
161 // TrayBackgroundView 161 // TrayBackgroundView
162 162
163 TrayBackgroundView::TrayBackgroundView( 163 TrayBackgroundView::TrayBackgroundView(
164 internal::StatusAreaWidget* status_area_widget) 164 internal::StatusAreaWidget* status_area_widget)
165 : status_area_widget_(status_area_widget), 165 : status_area_widget_(status_area_widget),
166 tray_container_(NULL), 166 tray_container_(NULL),
167 shelf_alignment_(SHELF_ALIGNMENT_BOTTOM), 167 shelf_alignment_(SHELF_ALIGNMENT_BOTTOM),
168 background_(NULL), 168 background_(NULL),
169 ALLOW_THIS_IN_INITIALIZER_LIST(hide_background_animator_( 169 hide_background_animator_(this, 0, kTrayBackgroundAlpha),
170 this, 0, kTrayBackgroundAlpha)), 170 hover_background_animator_(
171 ALLOW_THIS_IN_INITIALIZER_LIST(hover_background_animator_( 171 this, 0, kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha),
172 this, 0, kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha)), 172 widget_observer_(new TrayWidgetObserver(this)) {
173 ALLOW_THIS_IN_INITIALIZER_LIST(widget_observer_(
174 new TrayWidgetObserver(this))) {
175 set_notify_enter_exit_on_child(true); 173 set_notify_enter_exit_on_child(true);
176 174
177 // Initially we want to paint the background, but without the hover effect. 175 // Initially we want to paint the background, but without the hover effect.
178 SetPaintsBackground(true, internal::BackgroundAnimator::CHANGE_IMMEDIATE); 176 SetPaintsBackground(true, internal::BackgroundAnimator::CHANGE_IMMEDIATE);
179 hover_background_animator_.SetPaintsBackground(false, 177 hover_background_animator_.SetPaintsBackground(false,
180 internal::BackgroundAnimator::CHANGE_IMMEDIATE); 178 internal::BackgroundAnimator::CHANGE_IMMEDIATE);
181 179
182 tray_container_ = new TrayContainer(shelf_alignment_); 180 tray_container_ = new TrayContainer(shelf_alignment_);
183 SetContents(tray_container_); 181 SetContents(tray_container_);
184 tray_event_filter_.reset(new TrayEventFilter); 182 tray_event_filter_.reset(new TrayEventFilter);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 bubble_view->GetWidget()->GetNativeView()->GetRootWindow(); 384 bubble_view->GetWidget()->GetNativeView()->GetRootWindow();
387 ash::internal::ShelfLayoutManager* shelf = 385 ash::internal::ShelfLayoutManager* shelf =
388 ShelfLayoutManager::ForLauncher(root_window); 386 ShelfLayoutManager::ForLauncher(root_window);
389 bubble_view->SetArrowPaintType( 387 bubble_view->SetArrowPaintType(
390 shelf->IsVisible() ? views::BubbleBorder::PAINT_NORMAL : 388 shelf->IsVisible() ? views::BubbleBorder::PAINT_NORMAL :
391 views::BubbleBorder::PAINT_TRANSPARENT); 389 views::BubbleBorder::PAINT_TRANSPARENT);
392 } 390 }
393 391
394 } // namespace internal 392 } // namespace internal
395 } // namespace ash 393 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/test_system_tray_delegate.cc ('k') | ash/wm/activation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698