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

Side by Side Diff: webkit/glue/webdropdata.h

Issue 28108: Add an identity (id) to system drag & drop. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/common/render_messages.h ('k') | webkit/glue/webview.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // A struct for managing data being dropped on a webview. This represents a 5 // A struct for managing data being dropped on a webview. This represents a
6 // union of all the types of data that can be dropped in a platform neutral 6 // union of all the types of data that can be dropped in a platform neutral
7 // way. 7 // way.
8 8
9 #ifndef WEBKIT_GLUE_WEBDROPDATA_H_ 9 #ifndef WEBKIT_GLUE_WEBDROPDATA_H_
10 #define WEBKIT_GLUE_WEBDROPDATA_H_ 10 #define WEBKIT_GLUE_WEBDROPDATA_H_
11 11
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 #include "googleurl/src/gurl.h" 14 #include "googleurl/src/gurl.h"
15 15
16 struct IDataObject; 16 struct IDataObject;
17 17
18 struct WebDropData { 18 struct WebDropData {
19 // User is dropping a link on the webview. 19 // Construct with a given drag identity. Note: identity is an int32 because
20 // it is passed over the renderer NPAPI interface to gears.
21 explicit WebDropData(int32 drag_identity) : identity(drag_identity) {}
22 int32 identity;
23
24 // For default constructions, use drag |identity| 0.
25 WebDropData() : identity(0) {}
26
27 // User is dragging a link into the webview.
20 GURL url; 28 GURL url;
21 std::wstring url_title; // The title associated with |url|. 29 std::wstring url_title; // The title associated with |url|.
22 30
23 // File extension for dragging images from a webview to the desktop. 31 // File extension for dragging images from a webview to the desktop.
24 std::wstring file_extension; 32 std::wstring file_extension;
25 33
26 // User is dropping one or more files on the webview. 34 // User is dropping one or more files on the webview.
27 std::vector<std::wstring> filenames; 35 std::vector<std::wstring> filenames;
28 36
29 // User is dragging plain text into the webview. 37 // User is dragging plain text into the webview.
(...skipping 10 matching lines...) Expand all
40 std::string file_contents; 48 std::string file_contents;
41 49
42 // Helper method for converting Window's specific IDataObject to a WebDropData 50 // Helper method for converting Window's specific IDataObject to a WebDropData
43 // object. TODO(tc): Move this to the browser side since it's Windows 51 // object. TODO(tc): Move this to the browser side since it's Windows
44 // specific and no longer used in webkit. 52 // specific and no longer used in webkit.
45 static void PopulateWebDropData(IDataObject* data_object, 53 static void PopulateWebDropData(IDataObject* data_object,
46 WebDropData* drop_data); 54 WebDropData* drop_data);
47 }; 55 };
48 56
49 #endif // WEBKIT_GLUE_WEBDROPDATA_H_ 57 #endif // WEBKIT_GLUE_WEBDROPDATA_H_
OLDNEW
« no previous file with comments | « chrome/common/render_messages.h ('k') | webkit/glue/webview.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698