OLD | NEW |
1 // Copyright (c) 2010 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 APP_WIN_DRAG_SOURCE_H_ | 5 #ifndef UI_BASE_DRAGDROP_DRAG_SOURCE_H_ |
6 #define APP_WIN_DRAG_SOURCE_H_ | 6 #define UI_BASE_DRAGDROP_DRAG_SOURCE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <objidl.h> | 9 #include <objidl.h> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/ref_counted.h" | 12 #include "base/ref_counted.h" |
13 | 13 |
14 namespace app { | 14 namespace ui { |
15 namespace win { | |
16 | 15 |
17 // A base IDropSource implementation. Handles notifications sent by an active | 16 // A base IDropSource implementation. Handles notifications sent by an active |
18 // drag-drop operation as the user mouses over other drop targets on their | 17 // drag-drop operation as the user mouses over other drop targets on their |
19 // system. This object tells Windows whether or not the drag should continue, | 18 // system. This object tells Windows whether or not the drag should continue, |
20 // and supplies the appropriate cursors. | 19 // and supplies the appropriate cursors. |
21 class DragSource : public IDropSource, | 20 class DragSource : public IDropSource, |
22 public base::RefCountedThreadSafe<DragSource> { | 21 public base::RefCountedThreadSafe<DragSource> { |
23 public: | 22 public: |
24 DragSource(); | 23 DragSource(); |
25 virtual ~DragSource() {} | 24 virtual ~DragSource() {} |
(...skipping 19 matching lines...) Expand all Loading... |
45 virtual void OnDragSourceDrop() {} | 44 virtual void OnDragSourceDrop() {} |
46 virtual void OnDragSourceMove() {} | 45 virtual void OnDragSourceMove() {} |
47 | 46 |
48 private: | 47 private: |
49 // Set to true if we want to cancel the drag operation. | 48 // Set to true if we want to cancel the drag operation. |
50 bool cancel_drag_; | 49 bool cancel_drag_; |
51 | 50 |
52 DISALLOW_COPY_AND_ASSIGN(DragSource); | 51 DISALLOW_COPY_AND_ASSIGN(DragSource); |
53 }; | 52 }; |
54 | 53 |
55 } // namespace win | 54 } // namespace ui |
56 } // namespace app | |
57 | 55 |
58 #endif // APP_WIN_DRAG_SOURCE_H_ | 56 #endif // UI_BASE_DRAGDROP_DRAG_SOURCE_H_ |
OLD | NEW |