| OLD | NEW |
| 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 <map> |
| 12 #include <string> | 13 #include <string> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/string16.h" | 16 #include "base/string16.h" |
| 16 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 17 | 18 |
| 18 struct IDataObject; | 19 struct IDataObject; |
| 19 | 20 |
| 20 namespace WebKit { | 21 namespace WebKit { |
| 21 class WebDragData; | 22 class WebDragData; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 48 // User is dragging text/html into the webview (e.g., out of Firefox). | 49 // User is dragging text/html into the webview (e.g., out of Firefox). |
| 49 // |html_base_url| is the URL that the html fragment is taken from (used to | 50 // |html_base_url| is the URL that the html fragment is taken from (used to |
| 50 // resolve relative links). It's ok for |html_base_url| to be empty. | 51 // resolve relative links). It's ok for |html_base_url| to be empty. |
| 51 string16 text_html; | 52 string16 text_html; |
| 52 GURL html_base_url; | 53 GURL html_base_url; |
| 53 | 54 |
| 54 // User is dragging data from the webview (e.g., an image). | 55 // User is dragging data from the webview (e.g., an image). |
| 55 string16 file_description_filename; | 56 string16 file_description_filename; |
| 56 std::string file_contents; | 57 std::string file_contents; |
| 57 | 58 |
| 59 std::map<string16, string16> custom_data; |
| 60 |
| 58 // Convert to a WebDragData object. | 61 // Convert to a WebDragData object. |
| 59 WebKit::WebDragData ToDragData() const; | 62 WebKit::WebDragData ToDragData() const; |
| 60 | 63 |
| 61 // Helper method for converting Window's specific IDataObject to a WebDropData | 64 // Helper method for converting Window's specific IDataObject to a WebDropData |
| 62 // object. TODO(tc): Move this to the browser side since it's Windows | 65 // object. TODO(tc): Move this to the browser side since it's Windows |
| 63 // specific and no longer used in webkit. | 66 // specific and no longer used in webkit. |
| 64 static void PopulateWebDropData(IDataObject* data_object, | 67 static void PopulateWebDropData(IDataObject* data_object, |
| 65 WebDropData* drop_data); | 68 WebDropData* drop_data); |
| 66 }; | 69 }; |
| 67 | 70 |
| 68 #endif // WEBKIT_GLUE_WEBDROPDATA_H_ | 71 #endif // WEBKIT_GLUE_WEBDROPDATA_H_ |
| OLD | NEW |