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_DRAG_DROP_DRAG_IMAGE_VIEW_H_
6 #define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_
8 #include "ui/views/controls/image_view.h"
17 class DragImageView
: public views::ImageView
{
19 explicit DragImageView(gfx::NativeView context
);
20 virtual ~DragImageView();
22 // Sets the bounds of the native widget in screen
24 // TODO(oshima): Looks like this is root window's
25 // coordinate. Change this to screen's coordinate.
26 void SetBoundsInScreen(const gfx::Rect
& bounds
);
28 // Sets the position of the native widget.
29 void SetScreenPosition(const gfx::Point
& position
);
31 // Sets the visibility of the native widget.
32 void SetWidgetVisible(bool visible
);
35 // Overridden from views::ImageView.
36 virtual void OnPaint(gfx::Canvas
* canvas
) OVERRIDE
;
38 scoped_ptr
<views::Widget
> widget_
;
39 gfx::Size widget_size_
;
41 DISALLOW_COPY_AND_ASSIGN(DragImageView
);
44 } // namespace internal
47 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_