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
3 // found in the LICENSE file.
5 #ifndef ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
6 #define ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "ui/base/animation/animation_delegate.h"
12 #include "ui/gfx/display.h"
30 // SharedDisplayEdgeIndicator is responsible for showing a window that indicates
31 // the edge that a window can be dragged into another display.
32 class ASH_EXPORT SharedDisplayEdgeIndicator
: public ui::AnimationDelegate
{
34 SharedDisplayEdgeIndicator();
35 virtual ~SharedDisplayEdgeIndicator();
37 // Shows/Hides the indicator window. The |src_bounds| is for the window on
38 // the source display, and the |dst_bounds| is for the window on the other
40 void Show(const gfx::Rect
& src_bounds
, const gfx::Rect
& dst_bounds
);
43 // ui::AnimationDelegate overrides:
44 virtual void AnimationProgressed(const ui::Animation
* animation
) OVERRIDE
;
47 // Used to show the displays' shared edge where a window can be moved across.
48 // |src_widget_| is for the display where drag starts and |dst_widget_| is
49 // for the other display.
50 views::View
* src_indicator_
;
51 views::View
* dst_indicator_
;
53 // Used to transition the opacity.
54 scoped_ptr
<ui::ThrobAnimation
> animation_
;
56 DISALLOW_COPY_AND_ASSIGN(SharedDisplayEdgeIndicator
);
59 } // namespace internal
62 #endif // ASH_DISPLAY_SHARED_DISPLAY_EDGE_INDICATOR_H_