| 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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1572 template <> | 1572 template <> |
| 1573 struct ParamTraits<RendererPreferences> { | 1573 struct ParamTraits<RendererPreferences> { |
| 1574 typedef RendererPreferences param_type; | 1574 typedef RendererPreferences param_type; |
| 1575 static void Write(Message* m, const param_type& p) { | 1575 static void Write(Message* m, const param_type& p) { |
| 1576 WriteParam(m, p.can_accept_load_drops); | 1576 WriteParam(m, p.can_accept_load_drops); |
| 1577 WriteParam(m, p.should_antialias_text); | 1577 WriteParam(m, p.should_antialias_text); |
| 1578 WriteParam(m, static_cast<int>(p.hinting)); | 1578 WriteParam(m, static_cast<int>(p.hinting)); |
| 1579 WriteParam(m, static_cast<int>(p.subpixel_rendering)); | 1579 WriteParam(m, static_cast<int>(p.subpixel_rendering)); |
| 1580 WriteParam(m, p.focus_ring_color); | 1580 WriteParam(m, p.focus_ring_color); |
| 1581 WriteParam(m, p.browser_handles_top_level_requests); | 1581 WriteParam(m, p.browser_handles_top_level_requests); |
| 1582 WriteParam(m, p.caret_blink_interval); |
| 1582 } | 1583 } |
| 1583 static bool Read(const Message* m, void** iter, param_type* p) { | 1584 static bool Read(const Message* m, void** iter, param_type* p) { |
| 1584 if (!ReadParam(m, iter, &p->can_accept_load_drops)) | 1585 if (!ReadParam(m, iter, &p->can_accept_load_drops)) |
| 1585 return false; | 1586 return false; |
| 1586 if (!ReadParam(m, iter, &p->should_antialias_text)) | 1587 if (!ReadParam(m, iter, &p->should_antialias_text)) |
| 1587 return false; | 1588 return false; |
| 1588 | 1589 |
| 1589 int hinting = 0; | 1590 int hinting = 0; |
| 1590 if (!ReadParam(m, iter, &hinting)) | 1591 if (!ReadParam(m, iter, &hinting)) |
| 1591 return false; | 1592 return false; |
| 1592 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); | 1593 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); |
| 1593 | 1594 |
| 1594 int subpixel_rendering = 0; | 1595 int subpixel_rendering = 0; |
| 1595 if (!ReadParam(m, iter, &subpixel_rendering)) | 1596 if (!ReadParam(m, iter, &subpixel_rendering)) |
| 1596 return false; | 1597 return false; |
| 1597 p->subpixel_rendering = | 1598 p->subpixel_rendering = |
| 1598 static_cast<RendererPreferencesSubpixelRenderingEnum>( | 1599 static_cast<RendererPreferencesSubpixelRenderingEnum>( |
| 1599 subpixel_rendering); | 1600 subpixel_rendering); |
| 1600 | 1601 |
| 1601 int focus_ring_color; | 1602 int focus_ring_color; |
| 1602 if (!ReadParam(m, iter, &focus_ring_color)) | 1603 if (!ReadParam(m, iter, &focus_ring_color)) |
| 1603 return false; | 1604 return false; |
| 1604 p->focus_ring_color = focus_ring_color; | 1605 p->focus_ring_color = focus_ring_color; |
| 1605 | 1606 |
| 1606 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) | 1607 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) |
| 1607 return false; | 1608 return false; |
| 1608 | 1609 |
| 1610 if (!ReadParam(m, iter, &p->caret_blink_interval)) |
| 1611 return false; |
| 1612 |
| 1609 return true; | 1613 return true; |
| 1610 } | 1614 } |
| 1611 static void Log(const param_type& p, std::wstring* l) { | 1615 static void Log(const param_type& p, std::wstring* l) { |
| 1612 l->append(L"<RendererPreferences>"); | 1616 l->append(L"<RendererPreferences>"); |
| 1613 } | 1617 } |
| 1614 }; | 1618 }; |
| 1615 | 1619 |
| 1616 // Traits for WebPreferences structure to pack/unpack. | 1620 // Traits for WebPreferences structure to pack/unpack. |
| 1617 template <> | 1621 template <> |
| 1618 struct ParamTraits<WebPreferences> { | 1622 struct ParamTraits<WebPreferences> { |
| (...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 } | 2234 } |
| 2231 }; | 2235 }; |
| 2232 | 2236 |
| 2233 } // namespace IPC | 2237 } // namespace IPC |
| 2234 | 2238 |
| 2235 | 2239 |
| 2236 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2240 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
| 2237 #include "ipc/ipc_message_macros.h" | 2241 #include "ipc/ipc_message_macros.h" |
| 2238 | 2242 |
| 2239 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2243 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
| OLD | NEW |