OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "chrome/browser/bookmarks/bookmark_node_data.h" | 7 #include "chrome/browser/bookmarks/bookmark_node_data.h" |
8 #include "chrome/browser/ui/cocoa/web_contents_drag_source.h" | 8 #include "chrome/browser/ui/cocoa/tab_contents/web_contents_drag_source.h" |
9 | 9 |
10 // A class that handles tracking and event processing for a drag and drop | 10 // A class that handles tracking and event processing for a drag and drop |
11 // originating from the content area. | 11 // originating from the content area. |
12 @interface BookmarkDragSource : WebContentsDragSource { | 12 @interface BookmarkDragSource : WebContentsDragSource { |
13 @private | 13 @private |
14 // Our drop data. Should only be initialized once. | 14 // Our drop data. Should only be initialized once. |
15 std::vector<BookmarkNodeData::Element> dropData_; | 15 std::vector<BookmarkNodeData::Element> dropData_; |
16 | 16 |
17 Profile* profile_; | 17 Profile* profile_; |
18 } | 18 } |
19 | 19 |
20 // Initialize a DragDataSource object for a drag (originating on the given | 20 // Initialize a DragDataSource object for a drag (originating on the given |
21 // contentsView and with the given dropData and pboard). Fill the pasteboard | 21 // contentsView and with the given dropData and pboard). Fill the pasteboard |
22 // with data types appropriate for dropData. | 22 // with data types appropriate for dropData. |
23 - (id)initWithContentsView:(TabContentsViewCocoa*)contentsView | 23 - (id)initWithContentsView:(TabContentsViewCocoa*)contentsView |
24 dropData: | 24 dropData: |
25 (const std::vector<BookmarkNodeData::Element>&)dropData | 25 (const std::vector<BookmarkNodeData::Element>&)dropData |
26 profile:(Profile*)profile | 26 profile:(Profile*)profile |
27 pasteboard:(NSPasteboard*)pboard | 27 pasteboard:(NSPasteboard*)pboard |
28 dragOperationMask:(NSDragOperation)dragOperationMask; | 28 dragOperationMask:(NSDragOperation)dragOperationMask; |
29 | 29 |
30 @end | 30 @end |
OLD | NEW |