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

Side by Side Diff: chrome/common/render_messages.h

Issue 2804001: Mac: More pluming for OOP font loading (Closed)
Patch Set: Fix review comments Created 10 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "app/clipboard/clipboard.h" 12 #include "app/clipboard/clipboard.h"
13 #include "app/surface/transport_dib.h" 13 #include "app/surface/transport_dib.h"
14 #include "base/basictypes.h" 14 #include "base/basictypes.h"
15 #include "base/platform_file.h" 15 #include "base/platform_file.h"
16 #include "base/ref_counted.h" 16 #include "base/ref_counted.h"
17 #include "base/shared_memory.h" 17 #include "base/shared_memory.h"
18 #include "base/string16.h" 18 #include "base/string16.h"
19 #include "chrome/common/common_param_traits.h" 19 #include "chrome/common/common_param_traits.h"
20 #include "chrome/common/css_colors.h" 20 #include "chrome/common/css_colors.h"
21 #include "chrome/common/dom_storage_common.h" 21 #include "chrome/common/dom_storage_common.h"
22 #include "chrome/common/edit_command.h" 22 #include "chrome/common/edit_command.h"
23 #include "chrome/common/extensions/extension_extent.h" 23 #include "chrome/common/extensions/extension_extent.h"
24 #include "chrome/common/extensions/url_pattern.h" 24 #include "chrome/common/extensions/url_pattern.h"
25 #include "chrome/common/font_descriptor_mac.h"
25 #include "chrome/common/navigation_gesture.h" 26 #include "chrome/common/navigation_gesture.h"
26 #include "chrome/common/page_transition_types.h" 27 #include "chrome/common/page_transition_types.h"
27 #include "chrome/common/renderer_preferences.h" 28 #include "chrome/common/renderer_preferences.h"
28 #include "chrome/common/resource_response.h" 29 #include "chrome/common/resource_response.h"
29 #include "chrome/common/translate_errors.h" 30 #include "chrome/common/translate_errors.h"
30 #include "chrome/common/view_types.h" 31 #include "chrome/common/view_types.h"
31 #include "chrome/common/webkit_param_traits.h" 32 #include "chrome/common/webkit_param_traits.h"
32 #include "chrome/common/window_container_type.h" 33 #include "chrome/common/window_container_type.h"
33 #include "gfx/native_widget_types.h" 34 #include "gfx/native_widget_types.h"
34 #include "googleurl/src/gurl.h" 35 #include "googleurl/src/gurl.h"
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 p->set_value(value); 908 p->set_value(value);
908 p->set_form_control_type(form_control_type); 909 p->set_form_control_type(form_control_type);
909 p->set_size(size); 910 p->set_size(size);
910 return true; 911 return true;
911 } 912 }
912 static void Log(const param_type& p, std::wstring* l) { 913 static void Log(const param_type& p, std::wstring* l) {
913 l->append(L"<FormField>"); 914 l->append(L"<FormField>");
914 } 915 }
915 }; 916 };
916 917
918 // Traits for FontDescriptor structure to pack/unpack.
919 template <>
920 struct ParamTraits<FontDescriptor> {
921 typedef FontDescriptor param_type;
922 static void Write(Message* m, const param_type& p) {
923 WriteParam(m, p.font_name);
924 WriteParam(m, p.font_point_size);
925 }
926 static bool Read(const Message* m, void** iter, param_type* p) {
927 return(
928 ReadParam(m, iter, &p->font_name) &&
929 ReadParam(m, iter, &p->font_point_size));
930 }
931 static void Log(const param_type& p, std::wstring* l) {
932 l->append(L"<FontDescriptor>");
933 }
934 };
935
917 // Traits for ViewHostMsg_FrameNavigate_Params structure to pack/unpack. 936 // Traits for ViewHostMsg_FrameNavigate_Params structure to pack/unpack.
918 template <> 937 template <>
919 struct ParamTraits<ViewHostMsg_FrameNavigate_Params> { 938 struct ParamTraits<ViewHostMsg_FrameNavigate_Params> {
920 typedef ViewHostMsg_FrameNavigate_Params param_type; 939 typedef ViewHostMsg_FrameNavigate_Params param_type;
921 static void Write(Message* m, const param_type& p) { 940 static void Write(Message* m, const param_type& p) {
922 WriteParam(m, p.page_id); 941 WriteParam(m, p.page_id);
923 WriteParam(m, p.url); 942 WriteParam(m, p.url);
924 WriteParam(m, p.referrer); 943 WriteParam(m, p.referrer);
925 WriteParam(m, p.transition); 944 WriteParam(m, p.transition);
926 WriteParam(m, p.redirects); 945 WriteParam(m, p.redirects);
(...skipping 1889 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 l->append(L")"); 2835 l->append(L")");
2817 } 2836 }
2818 }; 2837 };
2819 2838
2820 } // namespace IPC 2839 } // namespace IPC
2821 2840
2822 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 2841 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
2823 #include "ipc/ipc_message_macros.h" 2842 #include "ipc/ipc_message_macros.h"
2824 2843
2825 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 2844 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698