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

Unified Diff: Source/web/WebColorSuggestion.cpp

Issue 23236002: Prepare for color input datalist support on Android (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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
Index: Source/web/WebColorSuggestion.cpp
diff --git a/Source/platform/exported/WebURL.cpp b/Source/web/WebColorSuggestion.cpp
similarity index 76%
copy from Source/platform/exported/WebURL.cpp
copy to Source/web/WebColorSuggestion.cpp
index 15694d4ead107f758de51bea62f21af6e0c0f4ba..23d4283f4c658e6145d40eb7ceee08796bd4ef34 100644
--- a/Source/platform/exported/WebURL.cpp
+++ b/Source/web/WebColorSuggestion.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -29,30 +29,23 @@
*/
#include "config.h"
-#include "public/platform/WebURL.h"
+#include "WebColorSuggestion.h"
-#include "weborigin/KURL.h"
+#include "platform/ColorSuggestion.h"
namespace blink {
-WebURL::WebURL(const WebCore::KURL& url)
- : m_string(url.string())
- , m_parsed(url.parsed())
- , m_isValid(url.isValid())
+WebColorSuggestion::WebColorSuggestion(const WebCore::ColorSuggestion& suggestion)
+ : color(static_cast<WebColor>(suggestion.color.rgb()))
+ , label(suggestion.label)
{
}
-WebURL& WebURL::operator=(const WebCore::KURL& url)
+WebColorSuggestion& WebColorSuggestion::operator=(const WebCore::ColorSuggestion& suggestion)
{
- m_string = url.string();
- m_parsed = url.parsed();
- m_isValid = url.isValid();
+ color = static_cast<WebColor>(suggestion.color.rgb());
+ label = suggestion.label;
return *this;
}
-WebURL::operator WebCore::KURL() const
-{
- return WebCore::KURL(m_string, m_parsed, m_isValid);
-}
-
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698