| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 5 #ifndef ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
| 6 #define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 6 #define ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "ui/views/controls/image_view.h" | 9 #include "ui/views/controls/image_view.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class Widget; | 12 class Widget; |
| 13 } | 13 } |
| 14 | 14 |
| 15 namespace aura_shell { | 15 namespace ash { |
| 16 namespace internal { | 16 namespace internal { |
| 17 | 17 |
| 18 class DragImageView : public views::ImageView { | 18 class DragImageView : public views::ImageView { |
| 19 public: | 19 public: |
| 20 DragImageView(); | 20 DragImageView(); |
| 21 virtual ~DragImageView(); | 21 virtual ~DragImageView(); |
| 22 | 22 |
| 23 // Sets the bounds of the native widget. | 23 // Sets the bounds of the native widget. |
| 24 void SetScreenBounds(const gfx::Rect& bounds); | 24 void SetScreenBounds(const gfx::Rect& bounds); |
| 25 | 25 |
| 26 // Sets the position of the native widget. | 26 // Sets the position of the native widget. |
| 27 void SetScreenPosition(const gfx::Point& position); | 27 void SetScreenPosition(const gfx::Point& position); |
| 28 | 28 |
| 29 // Sets the visibility of the native widget. | 29 // Sets the visibility of the native widget. |
| 30 void SetWidgetVisible(bool visible); | 30 void SetWidgetVisible(bool visible); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 scoped_ptr<views::Widget> widget_; | 33 scoped_ptr<views::Widget> widget_; |
| 34 | 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(DragImageView); | 35 DISALLOW_COPY_AND_ASSIGN(DragImageView); |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 } // namespace internal | 38 } // namespace internal |
| 39 } // namespace aura_shell | 39 } // namespace ash |
| 40 | 40 |
| 41 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ | 41 #endif // ASH_DRAG_DROP_DRAG_IMAGE_VIEW_H_ |
| OLD | NEW |