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

Unified Diff: chrome/common/webkit_param_traits.h

Issue 149620: Use WebWidget from the WebKit API. This change also makes... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/print_web_view_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/webkit_param_traits.h
===================================================================
--- chrome/common/webkit_param_traits.h (revision 20851)
+++ chrome/common/webkit_param_traits.h (working copy)
@@ -25,10 +25,12 @@
#include "chrome/common/ipc_message_utils.h"
#include "webkit/api/public/WebCache.h"
+#include "webkit/api/public/WebCompositionCommand.h"
#include "webkit/api/public/WebConsoleMessage.h"
#include "webkit/api/public/WebFindOptions.h"
#include "webkit/api/public/WebInputEvent.h"
#include "webkit/api/public/WebScreenInfo.h"
+#include "webkit/api/public/WebTextDirection.h"
namespace IPC {
@@ -95,6 +97,24 @@
};
template <>
+struct ParamTraits<WebKit::WebCompositionCommand> {
+ typedef WebKit::WebCompositionCommand param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, static_cast<int>(p));
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ int value;
+ if (!ReadParam(m, iter, &value))
+ return false;
+ *r = static_cast<param_type>(value);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ LogParam(static_cast<int>(p), l);
+ }
+};
+
+template <>
struct ParamTraits<WebKit::WebConsoleMessage::Level> {
typedef WebKit::WebConsoleMessage::Level param_type;
static void Write(Message* m, const param_type& p) {
@@ -264,6 +284,24 @@
}
};
+template <>
+struct ParamTraits<WebKit::WebTextDirection> {
+ typedef WebKit::WebTextDirection param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, static_cast<int>(p));
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ int value;
+ if (!ReadParam(m, iter, &value))
+ return false;
+ *r = static_cast<param_type>(value);
+ return true;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ LogParam(static_cast<int>(p), l);
+ }
+};
+
} // namespace IPC
#endif // CHROME_COMMON_WEBKIT_PARAM_TRAITS_H_
« no previous file with comments | « chrome/common/render_messages_internal.h ('k') | chrome/renderer/print_web_view_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698