Index: public/web/WebColorSuggestion.h |
diff --git a/public/web/WebMenuItemInfo.h b/public/web/WebColorSuggestion.h |
similarity index 66% |
copy from public/web/WebMenuItemInfo.h |
copy to public/web/WebColorSuggestion.h |
index f15caace7e8a2418d8c01396331d4bc59db36648..483b0536867ac0ac295f96e2cfde02cd133e7480 100644 |
--- a/public/web/WebMenuItemInfo.h |
+++ b/public/web/WebColorSuggestion.h |
@@ -28,44 +28,43 @@ |
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef WebMenuItemInfo_h |
-#define WebMenuItemInfo_h |
+#ifndef WebColorSuggestion_h |
+#define WebColorSuggestion_h |
-#include "../platform/WebCommon.h" |
+#include "../platform/WebColor.h" |
#include "../platform/WebString.h" |
-#include "../platform/WebVector.h" |
-#include "WebTextDirection.h" |
+ |
+#if INSIDE_WEBKIT |
+#include "core/platform/ColorChooserClient.h" |
tkent
2013/08/25 22:26:01
Should it be ColorSuggestion.h?
keishi
2013/08/26 05:29:15
Done.
|
+#else |
+namespace WebCore { |
+class ColorSuggestion; |
+} |
+#endif |
namespace WebKit { |
-struct WebMenuItemInfo { |
- enum Type { |
- Option, |
- CheckableOption, |
- Group, |
- Separator, |
- SubMenu |
- }; |
+struct WebColorSuggestion { |
+ WebColor colorValue; |
+ WebString displayValue; |
+ WebString label; |
- WebMenuItemInfo() |
- : type(Option) |
- , action(0) |
- , textDirection(WebTextDirectionDefault) |
- , hasTextDirectionOverride(false) |
- , enabled(false) |
- , checked(false) |
+#if INSIDE_WEBKIT |
+ BLINK_COMMON_EXPORT WebColorSuggestion(const WebCore::ColorSuggestion& suggestion) |
+ : colorValue(static_cast<WebColor>(suggestion.colorValue.rgb())) |
+ , displayValue(suggestion.displayValue) |
+ , label(suggestion.label) |
{ |
} |
- WebString label; |
- WebString toolTip; |
- Type type; |
- unsigned action; |
- WebTextDirection textDirection; |
- WebVector<WebMenuItemInfo> subMenuItems; |
- bool hasTextDirectionOverride; |
- bool enabled; |
- bool checked; |
+ BLINK_COMMON_EXPORT WebColorSuggestion& operator=(const WebCore::ColorSuggestion& suggestion) |
+ { |
+ colorValue = static_cast<WebColor>(suggestion.colorValue.rgb()); |
+ displayValue = suggestion.displayValue; |
+ label = suggestion.label; |
+ return *this; |
+ } |
+#endif |
}; |
} // namespace WebKit |