OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 // Traits for RendererPreferences structure to pack/unpack. | 1552 // Traits for RendererPreferences structure to pack/unpack. |
1553 template <> | 1553 template <> |
1554 struct ParamTraits<RendererPreferences> { | 1554 struct ParamTraits<RendererPreferences> { |
1555 typedef RendererPreferences param_type; | 1555 typedef RendererPreferences param_type; |
1556 static void Write(Message* m, const param_type& p) { | 1556 static void Write(Message* m, const param_type& p) { |
1557 WriteParam(m, p.can_accept_load_drops); | 1557 WriteParam(m, p.can_accept_load_drops); |
1558 WriteParam(m, p.should_antialias_text); | 1558 WriteParam(m, p.should_antialias_text); |
1559 WriteParam(m, static_cast<int>(p.hinting)); | 1559 WriteParam(m, static_cast<int>(p.hinting)); |
1560 WriteParam(m, static_cast<int>(p.subpixel_rendering)); | 1560 WriteParam(m, static_cast<int>(p.subpixel_rendering)); |
1561 WriteParam(m, p.focus_ring_color); | 1561 WriteParam(m, p.focus_ring_color); |
| 1562 WriteParam(m, p.thumb_active_color); |
| 1563 WriteParam(m, p.thumb_inactive_color); |
| 1564 WriteParam(m, p.track_color); |
1562 WriteParam(m, p.browser_handles_top_level_requests); | 1565 WriteParam(m, p.browser_handles_top_level_requests); |
1563 } | 1566 } |
1564 static bool Read(const Message* m, void** iter, param_type* p) { | 1567 static bool Read(const Message* m, void** iter, param_type* p) { |
1565 if (!ReadParam(m, iter, &p->can_accept_load_drops)) | 1568 if (!ReadParam(m, iter, &p->can_accept_load_drops)) |
1566 return false; | 1569 return false; |
1567 if (!ReadParam(m, iter, &p->should_antialias_text)) | 1570 if (!ReadParam(m, iter, &p->should_antialias_text)) |
1568 return false; | 1571 return false; |
1569 | 1572 |
1570 int hinting = 0; | 1573 int hinting = 0; |
1571 if (!ReadParam(m, iter, &hinting)) | 1574 if (!ReadParam(m, iter, &hinting)) |
1572 return false; | 1575 return false; |
1573 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); | 1576 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); |
1574 | 1577 |
1575 int subpixel_rendering = 0; | 1578 int subpixel_rendering = 0; |
1576 if (!ReadParam(m, iter, &subpixel_rendering)) | 1579 if (!ReadParam(m, iter, &subpixel_rendering)) |
1577 return false; | 1580 return false; |
1578 p->subpixel_rendering = | 1581 p->subpixel_rendering = |
1579 static_cast<RendererPreferencesSubpixelRenderingEnum>( | 1582 static_cast<RendererPreferencesSubpixelRenderingEnum>( |
1580 subpixel_rendering); | 1583 subpixel_rendering); |
1581 | 1584 |
1582 int focus_ring_color; | 1585 int focus_ring_color; |
1583 if (!ReadParam(m, iter, &focus_ring_color)) | 1586 if (!ReadParam(m, iter, &focus_ring_color)) |
1584 return false; | 1587 return false; |
1585 p->focus_ring_color = focus_ring_color; | 1588 p->focus_ring_color = focus_ring_color; |
1586 | 1589 |
| 1590 int thumb_active_color, thumb_inactive_color, track_color; |
| 1591 if (!ReadParam(m, iter, &thumb_active_color) || |
| 1592 !ReadParam(m, iter, &thumb_inactive_color) || |
| 1593 !ReadParam(m, iter, &track_color)) |
| 1594 return false; |
| 1595 p->thumb_active_color = thumb_active_color; |
| 1596 p->thumb_inactive_color = thumb_inactive_color; |
| 1597 p->track_color = track_color; |
| 1598 |
1587 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) | 1599 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) |
1588 return false; | 1600 return false; |
1589 | 1601 |
1590 return true; | 1602 return true; |
1591 } | 1603 } |
1592 static void Log(const param_type& p, std::wstring* l) { | 1604 static void Log(const param_type& p, std::wstring* l) { |
1593 l->append(L"<RendererPreferences>"); | 1605 l->append(L"<RendererPreferences>"); |
1594 } | 1606 } |
1595 }; | 1607 }; |
1596 | 1608 |
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2304 } | 2316 } |
2305 }; | 2317 }; |
2306 | 2318 |
2307 } // namespace IPC | 2319 } // namespace IPC |
2308 | 2320 |
2309 | 2321 |
2310 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2322 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2311 #include "ipc/ipc_message_macros.h" | 2323 #include "ipc/ipc_message_macros.h" |
2312 | 2324 |
2313 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2325 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |