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

Side by Side Diff: content/public/common/drop_data.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
« no previous file with comments | « content/public/browser/web_drag_dest_delegate.h ('k') | content/public/common/drop_data.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 WebContents. This represents
6 // union of all the types of data that can be dropped in a platform neutral 6 // a union of all the types of data that can be dropped in a platform neutral
7 // way. 7 // way.
8 8
9 #ifndef WEBKIT_COMMON_WEBDROPDATA_H_ 9 #ifndef CONTENT_PUBLIC_COMMON_DROP_DATA_H_
10 #define WEBKIT_COMMON_WEBDROPDATA_H_ 10 #define CONTENT_PUBLIC_COMMON_DROP_DATA_H_
11 11
12 #include <map> 12 #include <map>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/strings/nullable_string16.h" 16 #include "base/strings/nullable_string16.h"
17 #include "base/strings/string16.h" 17 #include "content/common/content_export.h"
18 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" 18 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
19 #include "url/gurl.h" 19 #include "url/gurl.h"
20 #include "webkit/common/webkit_common_export.h"
21 20
22 struct IDataObject; 21 namespace content {
23 22
24 namespace WebKit { 23 struct CONTENT_EXPORT DropData {
25 class WebDragData;
26 }
27
28 struct WEBKIT_COMMON_EXPORT WebDropData {
29 // The struct is used to represent a file in the drop data. 24 // The struct is used to represent a file in the drop data.
30 struct WEBKIT_COMMON_EXPORT FileInfo { 25 struct CONTENT_EXPORT FileInfo {
31 FileInfo(); 26 FileInfo();
32 FileInfo(const base::string16& path, const base::string16& display_name); 27 FileInfo(const base::string16& path, const base::string16& display_name);
33 28
34 // The path of the file. 29 // The path of the file.
35 base::string16 path; 30 base::string16 path;
36 // The display name of the file. This field is optional. 31 // The display name of the file. This field is optional.
37 base::string16 display_name; 32 base::string16 display_name;
38 }; 33 };
39 34
40 // Construct from a WebDragData object. 35 DropData();
41 explicit WebDropData(const WebKit::WebDragData&); 36 ~DropData();
42
43 WebDropData();
44
45 ~WebDropData();
46 37
47 // User is dragging a link into the webview. 38 // User is dragging a link into the webview.
48 GURL url; 39 GURL url;
49 base::string16 url_title; // The title associated with |url|. 40 base::string16 url_title; // The title associated with |url|.
50 41
51 // User is dragging a link out-of the webview. 42 // User is dragging a link out-of the webview.
52 base::string16 download_metadata; 43 base::string16 download_metadata;
53 44
54 // Referrer policy to use when dragging a link out of the webview results in 45 // Referrer policy to use when dragging a link out of the webview results in
55 // a download. 46 // a download.
(...skipping 14 matching lines...) Expand all
70 base::NullableString16 html; 61 base::NullableString16 html;
71 GURL html_base_url; 62 GURL html_base_url;
72 63
73 // User is dragging data from the webview (e.g., an image). 64 // User is dragging data from the webview (e.g., an image).
74 base::string16 file_description_filename; 65 base::string16 file_description_filename;
75 std::string file_contents; 66 std::string file_contents;
76 67
77 std::map<base::string16, base::string16> custom_data; 68 std::map<base::string16, base::string16> custom_data;
78 }; 69 };
79 70
80 #endif // WEBKIT_COMMON_WEBDROPDATA_H_ 71 } // namespace content
72
73 #endif // CONTENT_PUBLIC_COMMON_DROP_DATA_H_
OLDNEW
« no previous file with comments | « content/public/browser/web_drag_dest_delegate.h ('k') | content/public/common/drop_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698