OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/memory/scoped_ptr.h" | 7 #include <memory> |
| 8 |
8 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
9 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
10 #include "content/public/common/drop_data.h" | 11 #include "content/public/common/drop_data.h" |
11 | 12 |
12 namespace content { | 13 namespace content { |
13 class RenderViewHost; | 14 class RenderViewHost; |
14 class WebContentsImpl; | 15 class WebContentsImpl; |
15 class WebDragDestDelegate; | 16 class WebDragDestDelegate; |
16 } | 17 } |
17 | 18 |
(...skipping 14 matching lines...) Expand all Loading... |
32 | 33 |
33 // Updated asynchronously during a drag to tell us whether or not we should | 34 // Updated asynchronously during a drag to tell us whether or not we should |
34 // allow the drop. | 35 // allow the drop. |
35 NSDragOperation currentOperation_; | 36 NSDragOperation currentOperation_; |
36 | 37 |
37 // Keep track of the render view host we're dragging over. If it changes | 38 // Keep track of the render view host we're dragging over. If it changes |
38 // during a drag, we need to re-send the DragEnter message. | 39 // during a drag, we need to re-send the DragEnter message. |
39 RenderViewHostIdentifier currentRVH_; | 40 RenderViewHostIdentifier currentRVH_; |
40 | 41 |
41 // The data for the current drag, or NULL if none is in progress. | 42 // The data for the current drag, or NULL if none is in progress. |
42 scoped_ptr<content::DropData> dropData_; | 43 std::unique_ptr<content::DropData> dropData_; |
43 | 44 |
44 // True if the drag has been canceled. | 45 // True if the drag has been canceled. |
45 bool canceled_; | 46 bool canceled_; |
46 } | 47 } |
47 | 48 |
48 // |contents| is the WebContentsImpl representing this tab, used to communicate | 49 // |contents| is the WebContentsImpl representing this tab, used to communicate |
49 // drag&drop messages to WebCore and handle navigation on a successful drop | 50 // drag&drop messages to WebCore and handle navigation on a successful drop |
50 // (if necessary). | 51 // (if necessary). |
51 - (id)initWithWebContentsImpl:(content::WebContentsImpl*)contents; | 52 - (id)initWithWebContentsImpl:(content::WebContentsImpl*)contents; |
52 | 53 |
(...skipping 26 matching lines...) Expand all Loading... |
79 fromPasteboard:(NSPasteboard*)pboard; | 80 fromPasteboard:(NSPasteboard*)pboard; |
80 // Given a point in window coordinates and a view in that window, return a | 81 // Given a point in window coordinates and a view in that window, return a |
81 // flipped point in the coordinate system of |view|. | 82 // flipped point in the coordinate system of |view|. |
82 - (NSPoint)flipWindowPointToView:(const NSPoint&)windowPoint | 83 - (NSPoint)flipWindowPointToView:(const NSPoint&)windowPoint |
83 view:(NSView*)view; | 84 view:(NSView*)view; |
84 // Given a point in window coordinates and a view in that window, return a | 85 // Given a point in window coordinates and a view in that window, return a |
85 // flipped point in screen coordinates. | 86 // flipped point in screen coordinates. |
86 - (NSPoint)flipWindowPointToScreen:(const NSPoint&)windowPoint | 87 - (NSPoint)flipWindowPointToScreen:(const NSPoint&)windowPoint |
87 view:(NSView*)view; | 88 view:(NSView*)view; |
88 @end | 89 @end |
OLD | NEW |