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

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

Issue 2053113002: Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/common/material_design/material_design_controller.h" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "ash/common/shelf/wm_shelf_util.h" 8 #include "ash/common/shelf/wm_shelf_util.h"
9 #include "ash/common/shell_window_ids.h" 9 #include "ash/common/shell_window_ids.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { 371 if (event->type() == ui::ET_GESTURE_TAP_DOWN) {
372 SetDrawBackgroundAsActive(true); 372 SetDrawBackgroundAsActive(true);
373 } else if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN || 373 } else if (event->type() == ui::ET_GESTURE_SCROLL_BEGIN ||
374 event->type() == ui::ET_GESTURE_TAP_CANCEL) { 374 event->type() == ui::ET_GESTURE_TAP_CANCEL) {
375 SetDrawBackgroundAsActive(false); 375 SetDrawBackgroundAsActive(false);
376 } 376 }
377 } 377 }
378 ActionableView::OnGestureEvent(event); 378 ActionableView::OnGestureEvent(event);
379 } 379 }
380 380
381 void TrayBackgroundView::UpdateBackground(int alpha) { 381 void TrayBackgroundView::UpdateBackground(BackgroundAnimator* animator,
382 int alpha) {
382 // The animator should never fire when the alternate shelf layout is used. 383 // The animator should never fire when the alternate shelf layout is used.
383 if (!background_ || draw_background_as_active_) 384 if (!background_ || draw_background_as_active_)
384 return; 385 return;
385 SchedulePaint(); 386 SchedulePaint();
386 } 387 }
387 388
388 void TrayBackgroundView::SetContents(views::View* contents) { 389 void TrayBackgroundView::SetContents(views::View* contents) {
389 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0)); 390 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
390 AddChildView(contents); 391 AddChildView(contents);
391 } 392 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 return; 568 return;
568 SchedulePaint(); 569 SchedulePaint();
569 } 570 }
570 571
571 void TrayBackgroundView::UpdateBubbleViewArrow( 572 void TrayBackgroundView::UpdateBubbleViewArrow(
572 views::TrayBubbleView* bubble_view) { 573 views::TrayBubbleView* bubble_view) {
573 // Nothing to do here. 574 // Nothing to do here.
574 } 575 }
575 576
576 } // namespace ash 577 } // namespace ash
OLDNEW
« ash/shelf/shelf_background_animator_delegate.h ('K') | « ash/system/tray/tray_background_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698