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