Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: content/browser/web_contents/web_drag_dest_win.h

Issue 18281002: Move WebDropData to content::DropData and split off conversion function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build error. Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_WIN_H_ 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_WIN_H_
6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_WIN_H_ 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_WIN_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "content/public/common/drop_data.h"
10 #include "third_party/WebKit/public/web/WebDragOperation.h" 11 #include "third_party/WebKit/public/web/WebDragOperation.h"
11 #include "ui/base/dragdrop/drop_target_win.h" 12 #include "ui/base/dragdrop/drop_target_win.h"
12 #include "webkit/common/webdropdata.h"
13 13
14 namespace content { 14 namespace content {
15 class InterstitialDropTarget; 15 class InterstitialDropTarget;
16 class RenderViewHost; 16 class RenderViewHost;
17 class WebContents; 17 class WebContents;
18 class WebDragDestDelegate; 18 class WebDragDestDelegate;
19 19
20 // A helper object that provides drop capabilities to a WebContentsImpl. The 20 // A helper object that provides drop capabilities to a WebContentsImpl. The
21 // DropTarget handles drags that enter the region of the WebContents by 21 // DropTarget handles drags that enter the region of the WebContents by
22 // passing on the events to the renderer. 22 // passing on the events to the renderer.
23 class CONTENT_EXPORT WebDragDest : public ui::DropTargetWin { 23 class CONTENT_EXPORT WebDragDest : public ui::DropTargetWin {
24 public: 24 public:
25 // Create a new WebDragDest associating it with the given HWND and 25 // Create a new WebDragDest associating it with the given HWND and
26 // WebContents. 26 // WebContents.
27 WebDragDest(HWND source_hwnd, WebContents* contents); 27 WebDragDest(HWND source_hwnd, WebContents* contents);
28 virtual ~WebDragDest(); 28 virtual ~WebDragDest();
29 29
30 WebDropData* current_drop_data() const { return drop_data_.get(); } 30 DropData* current_drop_data() const { return drop_data_.get(); }
31 31
32 void set_drag_cursor(WebKit::WebDragOperation op) { 32 void set_drag_cursor(WebKit::WebDragOperation op) {
33 drag_cursor_ = op; 33 drag_cursor_ = op;
34 } 34 }
35 35
36 WebDragDestDelegate* delegate() const { return delegate_; } 36 WebDragDestDelegate* delegate() const { return delegate_; }
37 void set_delegate(WebDragDestDelegate* d) { delegate_ = d; } 37 void set_delegate(WebDragDestDelegate* d) { delegate_ = d; }
38 38
39 protected: 39 protected:
40 virtual DWORD OnDragEnter(IDataObject* data_object, 40 virtual DWORD OnDragEnter(IDataObject* data_object,
(...skipping 28 matching lines...) Expand all
69 WebKit::WebDragOperation drag_cursor_; 69 WebKit::WebDragOperation drag_cursor_;
70 70
71 // A special drop target handler for when we try to d&d while an interstitial 71 // A special drop target handler for when we try to d&d while an interstitial
72 // page is showing. 72 // page is showing.
73 scoped_ptr<InterstitialDropTarget> interstitial_drop_target_; 73 scoped_ptr<InterstitialDropTarget> interstitial_drop_target_;
74 74
75 // A delegate that can receive drag information about drag events. 75 // A delegate that can receive drag information about drag events.
76 WebDragDestDelegate* delegate_; 76 WebDragDestDelegate* delegate_;
77 77
78 // The data for the current drag, or NULL if |context_| is NULL. 78 // The data for the current drag, or NULL if |context_| is NULL.
79 scoped_ptr<WebDropData> drop_data_; 79 scoped_ptr<DropData> drop_data_;
80 80
81 // True if the drag has been canceled. 81 // True if the drag has been canceled.
82 bool canceled_; 82 bool canceled_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(WebDragDest); 84 DISALLOW_COPY_AND_ASSIGN(WebDragDest);
85 }; 85 };
86 86
87 } // namespace content 87 } // namespace content
88 88
89 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_WIN_H_ 89 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_DRAG_DEST_WIN_H_
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_drag_dest_mac_unittest.mm ('k') | content/browser/web_contents/web_drag_dest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698