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

Unified Diff: Source/platform/exported/WebDragData.cpp

Issue 925913002: Fixed WebDragData's wrong dependency. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/web/DragClientImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..dc44c7a7d9b5da1b3eb7f2b6865e19e65a122cbb 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(WebVector<Item> itemList)
{
+ ASSERT(!isNull());
+ m_itemList.swap(itemList);
}
-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.swap(itemList);
}
} // namespace blink
« no previous file with comments | « Source/platform/blink_platform.gypi ('k') | Source/web/DragClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698