Index: Source/platform/exported/WebDragData.cpp |
diff --git a/Source/platform/exported/WebURL.cpp b/Source/platform/exported/WebDragData.cpp |
similarity index 79% |
copy from Source/platform/exported/WebURL.cpp |
copy to Source/platform/exported/WebDragData.cpp |
index 755d026727802a0ff0d133d1567ff084b08859fe..a1727eda1910d141b02098cbfd0468cff43669a2 100644 |
--- a/Source/platform/exported/WebURL.cpp |
+++ b/Source/platform/exported/WebDragData.cpp |
@@ -29,30 +29,25 @@ |
*/ |
#include "config.h" |
-#include "public/platform/WebURL.h" |
- |
-#include "platform/weborigin/KURL.h" |
+#include "public/platform/WebDragData.h" |
namespace blink { |
-WebURL::WebURL(const KURL& url) |
- : m_string(url.string()) |
- , m_parsed(url.parsed()) |
- , m_isValid(url.isValid()) |
+void WebDragData::setItems(const WebVector<Item>& itemList) |
{ |
+ ASSERT(!isNull()); |
+ m_itemList = itemList; |
dcheng
2015/02/23 16:19:52
Using swap() would be nice here, but I don't know
tasak
2015/02/25 08:15:24
Done.
|
} |
-WebURL& WebURL::operator=(const KURL& url) |
+void WebDragData::addItem(const Item& item) |
{ |
- m_string = url.string(); |
- m_parsed = url.parsed(); |
- m_isValid = url.isValid(); |
- return *this; |
-} |
+ ASSERT(!isNull()); |
+ WebVector<Item> itemList(m_itemList.size() + 1); |
-WebURL::operator KURL() const |
-{ |
- return KURL(m_string, m_parsed, m_isValid); |
+ for (unsigned i = 0; i < m_itemList.size(); ++i) |
+ itemList[i] = m_itemList[i]; |
+ itemList[m_itemList.size()] = item; |
+ m_itemList = itemList; |
dcheng
2015/02/23 16:19:52
Use swap() instead of assigning? This is going to
tasak
2015/02/25 08:15:24
Done.
|
} |
} // namespace blink |