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

Unified Diff: chrome/common/icon_messages.cc

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error for clank mac and unit test memory leak Created 9 years, 8 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/icon_messages.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/icon_messages.cc
diff --git a/chrome/common/icon_messages.cc b/chrome/common/icon_messages.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7648c1471e83214b32968a5bdb2382478256d812
--- /dev/null
+++ b/chrome/common/icon_messages.cc
@@ -0,0 +1,60 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/icon_messages.h"
+
+#include "content/common/common_param_traits.h"
+
+FaviconURL::FaviconURL()
+ : icon_type(INVALID_ICON) {
+}
+
+FaviconURL::FaviconURL(const GURL& url, IconType type)
+ : icon_url(url),
+ icon_type(type) {
+}
+
+FaviconURL::~FaviconURL() {
+}
+
+namespace IPC {
+
+// static
+void ParamTraits<IconType>::Write(Message* m, const param_type& p) {
+ m->WriteInt(p);
+}
+
+// static
+bool ParamTraits<IconType>::Read(const Message* m, void** iter, param_type* p) {
+ int type;
+ if (!m->ReadInt(iter, &type))
+ return false;
+ *p = static_cast<IconType>(type);
+ return true;
+}
+
+// static
+void ParamTraits<IconType>::Log(const param_type& p, std::string* l) {
+ l->append("IconType");
+}
+
+// static
+void ParamTraits<FaviconURL>::Write(Message* m, const param_type& p) {
+ WriteParam(m, p.icon_url);
+ WriteParam(m, p.icon_type);
+}
+
+// static
+bool ParamTraits<FaviconURL>::Read(const Message* m,
+ void** iter,
+ param_type* p) {
+ return ReadParam(m, iter, &p->icon_url) && ReadParam(m, iter, &p->icon_type);
+}
+
+// static
+void ParamTraits<FaviconURL>::Log(const param_type& p, std::string* l) {
+ l->append("<FaviconURL>");
+}
+
+} // namespace IPC
« no previous file with comments | « chrome/common/icon_messages.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698