OLD | NEW |
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> |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 int item_height; | 485 int item_height; |
486 | 486 |
487 // The size of the font to use for those items. | 487 // The size of the font to use for those items. |
488 double item_font_size; | 488 double item_font_size; |
489 | 489 |
490 // The currently selected (displayed) item in the menu. | 490 // The currently selected (displayed) item in the menu. |
491 int selected_item; | 491 int selected_item; |
492 | 492 |
493 // The entire list of items in the popup menu. | 493 // The entire list of items in the popup menu. |
494 std::vector<WebMenuItem> popup_items; | 494 std::vector<WebMenuItem> popup_items; |
| 495 |
| 496 // Whether items should be right-aligned. |
| 497 bool right_aligned; |
495 }; | 498 }; |
496 | 499 |
497 // Parameters for the IPC message ViewHostMsg_ScriptedPrint | 500 // Parameters for the IPC message ViewHostMsg_ScriptedPrint |
498 struct ViewHostMsg_ScriptedPrint_Params { | 501 struct ViewHostMsg_ScriptedPrint_Params { |
499 int routing_id; | 502 int routing_id; |
500 gfx::NativeViewId host_window_id; | 503 gfx::NativeViewId host_window_id; |
501 int cookie; | 504 int cookie; |
502 int expected_pages_count; | 505 int expected_pages_count; |
503 bool has_selection; | 506 bool has_selection; |
504 bool use_overlays; | 507 bool use_overlays; |
(...skipping 1604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2109 // Traits for ViewHostMsg_ShowPopup_Params. | 2112 // Traits for ViewHostMsg_ShowPopup_Params. |
2110 template <> | 2113 template <> |
2111 struct ParamTraits<ViewHostMsg_ShowPopup_Params> { | 2114 struct ParamTraits<ViewHostMsg_ShowPopup_Params> { |
2112 typedef ViewHostMsg_ShowPopup_Params param_type; | 2115 typedef ViewHostMsg_ShowPopup_Params param_type; |
2113 static void Write(Message* m, const param_type& p) { | 2116 static void Write(Message* m, const param_type& p) { |
2114 WriteParam(m, p.bounds); | 2117 WriteParam(m, p.bounds); |
2115 WriteParam(m, p.item_height); | 2118 WriteParam(m, p.item_height); |
2116 WriteParam(m, p.item_font_size); | 2119 WriteParam(m, p.item_font_size); |
2117 WriteParam(m, p.selected_item); | 2120 WriteParam(m, p.selected_item); |
2118 WriteParam(m, p.popup_items); | 2121 WriteParam(m, p.popup_items); |
| 2122 WriteParam(m, p.right_aligned); |
2119 } | 2123 } |
2120 static bool Read(const Message* m, void** iter, param_type* p) { | 2124 static bool Read(const Message* m, void** iter, param_type* p) { |
2121 return | 2125 return |
2122 ReadParam(m, iter, &p->bounds) && | 2126 ReadParam(m, iter, &p->bounds) && |
2123 ReadParam(m, iter, &p->item_height) && | 2127 ReadParam(m, iter, &p->item_height) && |
2124 ReadParam(m, iter, &p->item_font_size) && | 2128 ReadParam(m, iter, &p->item_font_size) && |
2125 ReadParam(m, iter, &p->selected_item) && | 2129 ReadParam(m, iter, &p->selected_item) && |
2126 ReadParam(m, iter, &p->popup_items); | 2130 ReadParam(m, iter, &p->popup_items) && |
| 2131 ReadParam(m, iter, &p->right_aligned); |
2127 } | 2132 } |
2128 static void Log(const param_type& p, std::wstring* l) { | 2133 static void Log(const param_type& p, std::wstring* l) { |
2129 l->append(L"("); | 2134 l->append(L"("); |
2130 LogParam(p.bounds, l); | 2135 LogParam(p.bounds, l); |
2131 l->append(L", "); | 2136 l->append(L", "); |
2132 LogParam(p.item_height, l); | 2137 LogParam(p.item_height, l); |
2133 l->append(L", "); | 2138 l->append(L", "); |
2134 LogParam(p.item_font_size, l); | 2139 LogParam(p.item_font_size, l); |
2135 l->append(L", "); | 2140 l->append(L", "); |
2136 LogParam(p.selected_item, l); | 2141 LogParam(p.selected_item, l); |
2137 l->append(L", "); | 2142 l->append(L", "); |
2138 LogParam(p.popup_items, l); | 2143 LogParam(p.popup_items, l); |
| 2144 l->append(L", "); |
| 2145 LogParam(p.right_aligned, l); |
2139 l->append(L")"); | 2146 l->append(L")"); |
2140 } | 2147 } |
2141 }; | 2148 }; |
2142 | 2149 |
2143 // Traits for ViewHostMsg_ScriptedPrint_Params. | 2150 // Traits for ViewHostMsg_ScriptedPrint_Params. |
2144 template <> | 2151 template <> |
2145 struct ParamTraits<ViewHostMsg_ScriptedPrint_Params> { | 2152 struct ParamTraits<ViewHostMsg_ScriptedPrint_Params> { |
2146 typedef ViewHostMsg_ScriptedPrint_Params param_type; | 2153 typedef ViewHostMsg_ScriptedPrint_Params param_type; |
2147 static void Write(Message* m, const param_type& p) { | 2154 static void Write(Message* m, const param_type& p) { |
2148 WriteParam(m, p.routing_id); | 2155 WriteParam(m, p.routing_id); |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2659 l->append(L")"); | 2666 l->append(L")"); |
2660 } | 2667 } |
2661 }; | 2668 }; |
2662 | 2669 |
2663 } // namespace IPC | 2670 } // namespace IPC |
2664 | 2671 |
2665 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2672 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2666 #include "ipc/ipc_message_macros.h" | 2673 #include "ipc/ipc_message_macros.h" |
2667 | 2674 |
2668 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2675 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |