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

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

Issue 19417: Generate a file name when dragging an image to the desktop (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « webkit/glue/clipboard_conversion.cc ('k') | no next file » | 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 // User is dropping a link on the webview.
20 GURL url; 20 GURL url;
21 std::wstring url_title; // The title associated with |url|. 21 std::wstring url_title; // The title associated with |url|.
22 22
23 // File extension for dragging images from a webview to the desktop.
24 std::wstring file_extension;
25
23 // User is dropping one or more files on the webview. 26 // User is dropping one or more files on the webview.
24 std::vector<std::wstring> filenames; 27 std::vector<std::wstring> filenames;
25 28
26 // User is dragging plain text into the webview. 29 // User is dragging plain text into the webview.
27 std::wstring plain_text; 30 std::wstring plain_text;
28 31
29 // User is dragging text/html into the webview (e.g., out of Firefox). 32 // User is dragging text/html into the webview (e.g., out of Firefox).
30 // |html_base_url| is the URL that the html fragment is taken from (used to 33 // |html_base_url| is the URL that the html fragment is taken from (used to
31 // resolve relative links). It's ok for |html_base_url| to be empty. 34 // resolve relative links). It's ok for |html_base_url| to be empty.
32 std::wstring text_html; 35 std::wstring text_html;
33 GURL html_base_url; 36 GURL html_base_url;
34 37
35 // User is dragging data from the webview (e.g., an image). 38 // User is dragging data from the webview (e.g., an image).
36 std::wstring file_description_filename; 39 std::wstring file_description_filename;
37 std::string file_contents; 40 std::string file_contents;
38 41
39 // Helper method for converting Window's specific IDataObject to a WebDropData 42 // Helper method for converting Window's specific IDataObject to a WebDropData
40 // object. TODO(tc): Move this to the browser side since it's Windows 43 // object. TODO(tc): Move this to the browser side since it's Windows
41 // specific and no longer used in webkit. 44 // specific and no longer used in webkit.
42 static void PopulateWebDropData(IDataObject* data_object, 45 static void PopulateWebDropData(IDataObject* data_object,
43 WebDropData* drop_data); 46 WebDropData* drop_data);
44 }; 47 };
45 48
46 #endif // WEBKIT_GLUE_WEBDROPDATA_H_ 49 #endif // WEBKIT_GLUE_WEBDROPDATA_H_
OLDNEW
« no previous file with comments | « webkit/glue/clipboard_conversion.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698