| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |