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

Unified Diff: chrome/common/icon_messages.h

Issue 6672065: Support touch icon in FaviconHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix some style issues Created 9 years, 9 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: chrome/common/icon_messages.h
diff --git a/chrome/common/icon_messages.h b/chrome/common/icon_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..ec97d2d78ebc6bfcf99b7f20623f354d3b1053bf
--- /dev/null
+++ b/chrome/common/icon_messages.h
@@ -0,0 +1,54 @@
+// 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.
+
+// Multiply-included message file, no traditional include guard.
+#include "googleurl/src/gurl.h"
+#include "ipc/ipc_message.h"
+#include "ipc/ipc_param_traits.h"
+
+#ifndef CHROME_COMMON_ICON_MESSAGES_H__
+#define CHROME_COMMON_ICON_MESSAGES_H__
+
+// The icon type in a page. The definition must be same as history::IconType.
sky 2011/03/22 19:48:48 You should pull ViewHostMsg_UpdateFaviconURL into
michaelbai 2011/03/22 23:59:03 Probably not easy. Got error: redefinition of ‘cla
+enum IconType {
+ INVALID_ICON = 0x0,
+ FAVICON = 1 << 0,
+ TOUCH_ICON = 1 << 1,
+ TOUCH_PRECOMPOSED_ICON = 1 << 2
sky 2011/03/22 19:48:48 Add a test that makes sure the values match.
michaelbai 2011/03/22 23:59:03 Done.
+};
+
+// The favicon url from the render.
+struct FaviconURL {
+ FaviconURL();
+ FaviconURL(const GURL& url, IconType type);
+ ~FaviconURL();
+
+ // The url of the icon.
+ GURL icon_url;
+
+ // The type of the icon
+ IconType icon_type;
+};
+
+namespace IPC {
+
+template <>
+struct ParamTraits<IconType> {
+ typedef IconType param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* p);
+ static void Log(const param_type& p, std::string* l);
+};
+
+template <>
+struct ParamTraits<FaviconURL> {
+ typedef FaviconURL param_type;
+ static void Write(Message* m, const param_type& p);
+ static bool Read(const Message* m, void** iter, param_type* p);
+ static void Log(const param_type& p, std::string* l);
+};
+
+} // namespace IPC
+
+#endif // CHROME_COMMON_ICON_MESSAGES_H__

Powered by Google App Engine
This is Rietveld 408576698