summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 23:30:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 23:30:59 +0000
commit0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8 (patch)
tree1ad235e23d71bb494c8b67588b2798f713810cdd /chrome/common/render_messages.h
parentc90e16ce1fbc9abc1a1a58766e0418263ed28a84 (diff)
downloadchromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.zip
chromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.tar.gz
chromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.tar.bz2
Use WebConsoleMessage instead of ConsoleMessageLevel.
R=dglazkov Review URL: http://codereview.chromium.org/57073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 530e311..717303b 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -25,6 +25,7 @@
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_status.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindInPageRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "webkit/glue/autofill_form.h"
@@ -392,6 +393,45 @@ struct ParamTraits<WebKit::WebString> {
};
template <>
+struct ParamTraits<WebKit::WebConsoleMessage::Level> {
+ typedef WebKit::WebConsoleMessage::Level 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> {
+ typedef WebKit::WebConsoleMessage param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.level);
+ WriteParam(m, p.text);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ return
+ ReadParam(m, iter, &r->level) &&
+ ReadParam(m, iter, &r->text);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.level, l);
+ l->append(L", ");
+ LogParam(p.text, l);
+ l->append(L")");
+ }
+};
+
+template <>
struct ParamTraits<ResourceType::Type> {
typedef ResourceType::Type param_type;
static void Write(Message* m, const param_type& p) {