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 UI_BASE_DRAGDROP_DRAG_SOURCE_H_ | 5 #ifndef UI_BASE_DRAGDROP_DRAG_SOURCE_H_ |
6 #define UI_BASE_DRAGDROP_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/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "ui/base/ui_base_api.h" | |
13 | 14 |
14 namespace ui { | 15 namespace ui { |
15 | 16 |
16 // A base IDropSource implementation. Handles notifications sent by an active | 17 // A base IDropSource implementation. Handles notifications sent by an active |
17 // drag-drop operation as the user mouses over other drop targets on their | 18 // drag-drop operation as the user mouses over other drop targets on their |
18 // system. This object tells Windows whether or not the drag should continue, | 19 // system. This object tells Windows whether or not the drag should continue, |
19 // and supplies the appropriate cursors. | 20 // and supplies the appropriate cursors. |
20 class DragSource : public IDropSource, | 21 class UI_BASE_API DragSource : public IDropSource, |
21 public base::RefCountedThreadSafe<DragSource> { | 22 public base::RefCountedThreadSafe<DragSource> { |
Ben Goodger (Google)
2011/07/07 23:49:18
indentation
| |
22 public: | 23 public: |
23 DragSource(); | 24 DragSource(); |
24 virtual ~DragSource() {} | 25 virtual ~DragSource() {} |
25 | 26 |
26 // Stop the drag operation at the next chance we get. This doesn't | 27 // Stop the drag operation at the next chance we get. This doesn't |
27 // synchronously stop the drag (since Windows is controlling that), | 28 // synchronously stop the drag (since Windows is controlling that), |
28 // but lets us tell Windows to cancel the drag the next chance we get. | 29 // but lets us tell Windows to cancel the drag the next chance we get. |
29 void CancelDrag() { | 30 void CancelDrag() { |
30 cancel_drag_ = true; | 31 cancel_drag_ = true; |
31 } | 32 } |
(...skipping 15 matching lines...) Expand all Loading... | |
47 private: | 48 private: |
48 // Set to true if we want to cancel the drag operation. | 49 // Set to true if we want to cancel the drag operation. |
49 bool cancel_drag_; | 50 bool cancel_drag_; |
50 | 51 |
51 DISALLOW_COPY_AND_ASSIGN(DragSource); | 52 DISALLOW_COPY_AND_ASSIGN(DragSource); |
52 }; | 53 }; |
53 | 54 |
54 } // namespace ui | 55 } // namespace ui |
55 | 56 |
56 #endif // UI_BASE_DRAGDROP_DRAG_SOURCE_H_ | 57 #endif // UI_BASE_DRAGDROP_DRAG_SOURCE_H_ |
OLD | NEW |