OLD | NEW |
---|---|
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include <map> | 10 #include <map> |
(...skipping 1556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1567 | 1567 |
1568 // Traits for RendererPreferences structure to pack/unpack. | 1568 // Traits for RendererPreferences structure to pack/unpack. |
1569 template <> | 1569 template <> |
1570 struct ParamTraits<RendererPreferences> { | 1570 struct ParamTraits<RendererPreferences> { |
1571 typedef RendererPreferences param_type; | 1571 typedef RendererPreferences param_type; |
1572 static void Write(Message* m, const param_type& p) { | 1572 static void Write(Message* m, const param_type& p) { |
1573 WriteParam(m, p.can_accept_load_drops); | 1573 WriteParam(m, p.can_accept_load_drops); |
1574 WriteParam(m, p.should_antialias_text); | 1574 WriteParam(m, p.should_antialias_text); |
1575 WriteParam(m, static_cast<int>(p.hinting)); | 1575 WriteParam(m, static_cast<int>(p.hinting)); |
1576 WriteParam(m, static_cast<int>(p.subpixel_rendering)); | 1576 WriteParam(m, static_cast<int>(p.subpixel_rendering)); |
1577 WriteParam(m, p.focus_ring_color_r); | |
darin (slow to review)
2009/09/10 22:50:15
why not just send the WebKit::WebColor over IPC?
Evan Stade
2009/09/10 22:53:28
well, I can change the format of how the color is
| |
1578 WriteParam(m, p.focus_ring_color_g); | |
1579 WriteParam(m, p.focus_ring_color_b); | |
1577 WriteParam(m, p.browser_handles_top_level_requests); | 1580 WriteParam(m, p.browser_handles_top_level_requests); |
1578 } | 1581 } |
1579 static bool Read(const Message* m, void** iter, param_type* p) { | 1582 static bool Read(const Message* m, void** iter, param_type* p) { |
1580 if (!ReadParam(m, iter, &p->can_accept_load_drops)) | 1583 if (!ReadParam(m, iter, &p->can_accept_load_drops)) |
1581 return false; | 1584 return false; |
1582 if (!ReadParam(m, iter, &p->should_antialias_text)) | 1585 if (!ReadParam(m, iter, &p->should_antialias_text)) |
1583 return false; | 1586 return false; |
1584 | 1587 |
1585 int hinting = 0; | 1588 int hinting = 0; |
1586 if (!ReadParam(m, iter, &hinting)) | 1589 if (!ReadParam(m, iter, &hinting)) |
1587 return false; | 1590 return false; |
1588 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); | 1591 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); |
1589 | 1592 |
1590 int subpixel_rendering = 0; | 1593 int subpixel_rendering = 0; |
1591 if (!ReadParam(m, iter, &subpixel_rendering)) | 1594 if (!ReadParam(m, iter, &subpixel_rendering)) |
1592 return false; | 1595 return false; |
1593 p->subpixel_rendering = | 1596 p->subpixel_rendering = |
1594 static_cast<RendererPreferencesSubpixelRenderingEnum>( | 1597 static_cast<RendererPreferencesSubpixelRenderingEnum>( |
1595 subpixel_rendering); | 1598 subpixel_rendering); |
1596 | 1599 |
1600 int focus_ring_color_r; | |
1601 if (!ReadParam(m, iter, &focus_ring_color_r)) | |
1602 return false; | |
1603 p->focus_ring_color_r = focus_ring_color_r; | |
1604 | |
1605 int focus_ring_color_g; | |
1606 if (!ReadParam(m, iter, &focus_ring_color_g)) | |
1607 return false; | |
1608 p->focus_ring_color_g = focus_ring_color_g; | |
1609 | |
1610 int focus_ring_color_b; | |
1611 if (!ReadParam(m, iter, &focus_ring_color_b)) | |
1612 return false; | |
1613 p->focus_ring_color_b = focus_ring_color_b; | |
1614 | |
1597 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) | 1615 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) |
1598 return false; | 1616 return false; |
1599 | 1617 |
1600 return true; | 1618 return true; |
1601 } | 1619 } |
1602 static void Log(const param_type& p, std::wstring* l) { | 1620 static void Log(const param_type& p, std::wstring* l) { |
1603 l->append(L"<RendererPreferences>"); | 1621 l->append(L"<RendererPreferences>"); |
1604 } | 1622 } |
1605 }; | 1623 }; |
1606 | 1624 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2168 } | 2186 } |
2169 }; | 2187 }; |
2170 | 2188 |
2171 } // namespace IPC | 2189 } // namespace IPC |
2172 | 2190 |
2173 | 2191 |
2174 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2192 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2175 #include "ipc/ipc_message_macros.h" | 2193 #include "ipc/ipc_message_macros.h" |
2176 | 2194 |
2177 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2195 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |