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

Unified Diff: public/web/WebColorSuggestion.h

Issue 23236002: Prepare for color input datalist support on Android (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 7 years, 4 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
Index: public/web/WebColorSuggestion.h
diff --git a/public/web/WebTextCheckingResult.h b/public/web/WebColorSuggestion.h
similarity index 65%
copy from public/web/WebTextCheckingResult.h
copy to public/web/WebColorSuggestion.h
index 3520445dd91bd45e36f22fdcf2921d65103ea766..e2a06cd8f217cd359c49c81d0133b2ee188bbf32 100644
--- a/public/web/WebTextCheckingResult.h
+++ b/public/web/WebColorSuggestion.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 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
@@ -28,47 +28,43 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebTextCheckingResult_h
-#define WebTextCheckingResult_h
+#ifndef WebColorSuggestion_h
+#define WebColorSuggestion_h
-#include "../platform/WebCommon.h"
+#include "../platform/WebColor.h"
#include "../platform/WebString.h"
-#include "WebTextCheckingType.h"
+#if INSIDE_WEBKIT
+#include "core/platform/ColorSuggestion.h"
+#else
namespace WebCore {
-struct TextCheckingResult;
+class ColorSuggestion;
}
+#endif
namespace WebKit {
-// A checked entry of text checking.
-struct WebTextCheckingResult {
- WebTextCheckingResult()
- : type(WebTextCheckingTypeSpelling)
- , location(0)
- , length(0)
- , hash(0)
+struct WebColorSuggestion {
+ WebColor valueAsColor;
+ WebString valueAsText;
tkent 2013/08/26 05:34:56 Add comment here too.
+ WebString label;
+
+#if INSIDE_WEBKIT
+ BLINK_COMMON_EXPORT WebColorSuggestion(const WebCore::ColorSuggestion& suggestion)
+ : valueAsColor(static_cast<WebColor>(suggestion.valueAsColor.rgb()))
+ , valueAsText(suggestion.valueAsText)
+ , label(suggestion.label)
{
}
- WebTextCheckingResult(WebTextCheckingType type, int location, int length, const WebString& replacement = WebString(), uint32_t hash = 0)
- : type(type)
- , location(location)
- , length(length)
- , replacement(replacement)
- , hash(hash)
+ BLINK_COMMON_EXPORT WebColorSuggestion& operator=(const WebCore::ColorSuggestion& suggestion)
{
+ valueAsColor = static_cast<WebColor>(suggestion.valueAsColor.rgb());
+ valueAsText = suggestion.valueAsText;
+ label = suggestion.label;
+ return *this;
}
-
-#if WEBKIT_IMPLEMENTATION
- operator WebCore::TextCheckingResult() const;
#endif
-
- WebTextCheckingType type;
- int location;
- int length;
- WebString replacement;
- uint32_t hash;
};
} // namespace WebKit

Powered by Google App Engine
This is Rietveld 408576698