| Index: ash/system/tray/tray_background_view.cc
|
| ===================================================================
|
| --- ash/system/tray/tray_background_view.cc (revision 151762)
|
| +++ ash/system/tray/tray_background_view.cc (working copy)
|
| @@ -11,7 +11,6 @@
|
| #include "ash/system/status_area_widget_delegate.h"
|
| #include "ash/system/tray/tray_constants.h"
|
| #include "ui/aura/window.h"
|
| -#include "ui/compositor/layer_animation_observer.h"
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/skia_util.h"
|
| #include "ui/views/background.h"
|
| @@ -33,33 +32,6 @@
|
| namespace ash {
|
| namespace internal {
|
|
|
| -// Observe the tray layer animation and update the anchor when it changes.
|
| -// TODO(stevenjb): Observe or mirror the actual animation, not just the start
|
| -// and end points.
|
| -class TrayLayerAnimationObserver : public ui::LayerAnimationObserver {
|
| - public:
|
| - explicit TrayLayerAnimationObserver(TrayBackgroundView* host)
|
| - : host_(host) {
|
| - }
|
| -
|
| - virtual void OnLayerAnimationEnded(ui::LayerAnimationSequence* sequence) {
|
| - host_->AnchorUpdated();
|
| - }
|
| -
|
| - virtual void OnLayerAnimationAborted(ui::LayerAnimationSequence* sequence) {
|
| - host_->AnchorUpdated();
|
| - }
|
| -
|
| - virtual void OnLayerAnimationScheduled(ui::LayerAnimationSequence* sequence) {
|
| - host_->AnchorUpdated();
|
| - }
|
| -
|
| - private:
|
| - TrayBackgroundView* host_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(TrayLayerAnimationObserver);
|
| -};
|
| -
|
| class TrayBackground : public views::Background {
|
| public:
|
| TrayBackground() : alpha_(kTrayBackgroundAlpha) {}
|
| @@ -159,9 +131,7 @@
|
| ALLOW_THIS_IN_INITIALIZER_LIST(hide_background_animator_(
|
| this, 0, kTrayBackgroundAlpha)),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(hover_background_animator_(
|
| - this, 0, kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha)),
|
| - ALLOW_THIS_IN_INITIALIZER_LIST(layer_animation_observer_(
|
| - new TrayLayerAnimationObserver(this))) {
|
| + this, 0, kTrayBackgroundHoverAlpha - kTrayBackgroundAlpha)) {
|
| set_notify_enter_exit_on_child(true);
|
|
|
| // Initially we want to paint the background, but without the hover effect.
|
| @@ -174,16 +144,8 @@
|
| }
|
|
|
| TrayBackgroundView::~TrayBackgroundView() {
|
| - GetWidget()->GetNativeView()->layer()->GetAnimator()->RemoveObserver(
|
| - layer_animation_observer_.get());
|
| }
|
|
|
| -void TrayBackgroundView::Initialize() {
|
| - GetWidget()->GetNativeView()->layer()->GetAnimator()->AddObserver(
|
| - layer_animation_observer_.get());
|
| - SetBorder();
|
| -}
|
| -
|
| void TrayBackgroundView::OnMouseEntered(const ui::MouseEvent& event) {
|
| hover_background_animator_.SetPaintsBackground(true,
|
| internal::BackgroundAnimator::CHANGE_ANIMATE);
|
| @@ -198,21 +160,6 @@
|
| PreferredSizeChanged();
|
| }
|
|
|
| -void TrayBackgroundView::OnPaintFocusBorder(gfx::Canvas* canvas) {
|
| - // The tray itself expands to the right and bottom edge of the screen to make
|
| - // sure clicking on the edges brings up the popup. However, the focus border
|
| - // should be only around the container.
|
| - if (GetWidget() && GetWidget()->IsActive())
|
| - DrawBorder(canvas, GetContentsBounds());
|
| -}
|
| -
|
| -void TrayBackgroundView::AboutToRequestFocusFromTabTraversal(bool reverse) {
|
| - // Return focus to the login view. See crbug.com/120500.
|
| - views::View* v = GetNextFocusableView();
|
| - if (v)
|
| - v->AboutToRequestFocusFromTabTraversal(reverse);
|
| -}
|
| -
|
| bool TrayBackgroundView::PerformAction(const ui::Event& event) {
|
| return false;
|
| }
|
|
|