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

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 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/chrome_tests.gypi ('k') | chrome/common/icon_messages.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..47d4e9ffc93ffc5085627f1ee8db388b9f2af510
--- /dev/null
+++ b/chrome/common/icon_messages.h
@@ -0,0 +1,57 @@
+// 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_message_macros.h"
+#include "ipc/ipc_param_traits.h"
+
+// TODO : Pull ViewHostMsg_UpdateFaviconURL into this file
+
+#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.
+enum IconType {
+ INVALID_ICON = 0x0,
+ FAVICON = 1 << 0,
+ TOUCH_ICON = 1 << 1,
+ TOUCH_PRECOMPOSED_ICON = 1 << 2
+};
+
+// 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__
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/icon_messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698