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 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 // Traits for RendererPreferences structure to pack/unpack. | 1550 // Traits for RendererPreferences structure to pack/unpack. |
1551 template <> | 1551 template <> |
1552 struct ParamTraits<RendererPreferences> { | 1552 struct ParamTraits<RendererPreferences> { |
1553 typedef RendererPreferences param_type; | 1553 typedef RendererPreferences param_type; |
1554 static void Write(Message* m, const param_type& p) { | 1554 static void Write(Message* m, const param_type& p) { |
1555 WriteParam(m, p.can_accept_load_drops); | 1555 WriteParam(m, p.can_accept_load_drops); |
1556 WriteParam(m, p.should_antialias_text); | 1556 WriteParam(m, p.should_antialias_text); |
1557 WriteParam(m, static_cast<int>(p.hinting)); | 1557 WriteParam(m, static_cast<int>(p.hinting)); |
1558 WriteParam(m, static_cast<int>(p.subpixel_rendering)); | 1558 WriteParam(m, static_cast<int>(p.subpixel_rendering)); |
1559 WriteParam(m, p.focus_ring_color); | 1559 WriteParam(m, p.focus_ring_color); |
| 1560 WriteParam(m, p.thumb_active_color); |
| 1561 WriteParam(m, p.thumb_inactive_color); |
| 1562 WriteParam(m, p.track_color); |
1560 WriteParam(m, p.browser_handles_top_level_requests); | 1563 WriteParam(m, p.browser_handles_top_level_requests); |
1561 } | 1564 } |
1562 static bool Read(const Message* m, void** iter, param_type* p) { | 1565 static bool Read(const Message* m, void** iter, param_type* p) { |
1563 if (!ReadParam(m, iter, &p->can_accept_load_drops)) | 1566 if (!ReadParam(m, iter, &p->can_accept_load_drops)) |
1564 return false; | 1567 return false; |
1565 if (!ReadParam(m, iter, &p->should_antialias_text)) | 1568 if (!ReadParam(m, iter, &p->should_antialias_text)) |
1566 return false; | 1569 return false; |
1567 | 1570 |
1568 int hinting = 0; | 1571 int hinting = 0; |
1569 if (!ReadParam(m, iter, &hinting)) | 1572 if (!ReadParam(m, iter, &hinting)) |
1570 return false; | 1573 return false; |
1571 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); | 1574 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); |
1572 | 1575 |
1573 int subpixel_rendering = 0; | 1576 int subpixel_rendering = 0; |
1574 if (!ReadParam(m, iter, &subpixel_rendering)) | 1577 if (!ReadParam(m, iter, &subpixel_rendering)) |
1575 return false; | 1578 return false; |
1576 p->subpixel_rendering = | 1579 p->subpixel_rendering = |
1577 static_cast<RendererPreferencesSubpixelRenderingEnum>( | 1580 static_cast<RendererPreferencesSubpixelRenderingEnum>( |
1578 subpixel_rendering); | 1581 subpixel_rendering); |
1579 | 1582 |
1580 int focus_ring_color; | 1583 int focus_ring_color; |
1581 if (!ReadParam(m, iter, &focus_ring_color)) | 1584 if (!ReadParam(m, iter, &focus_ring_color)) |
1582 return false; | 1585 return false; |
1583 p->focus_ring_color = focus_ring_color; | 1586 p->focus_ring_color = focus_ring_color; |
1584 | 1587 |
| 1588 int thumb_active_color, thumb_inactive_color, track_color; |
| 1589 if (!ReadParam(m, iter, &thumb_active_color) || |
| 1590 !ReadParam(m, iter, &thumb_inactive_color) || |
| 1591 !ReadParam(m, iter, &track_color)) |
| 1592 return false; |
| 1593 p->thumb_active_color = thumb_active_color; |
| 1594 p->thumb_inactive_color = thumb_inactive_color; |
| 1595 p->track_color = track_color; |
| 1596 |
1585 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) | 1597 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) |
1586 return false; | 1598 return false; |
1587 | 1599 |
1588 return true; | 1600 return true; |
1589 } | 1601 } |
1590 static void Log(const param_type& p, std::wstring* l) { | 1602 static void Log(const param_type& p, std::wstring* l) { |
1591 l->append(L"<RendererPreferences>"); | 1603 l->append(L"<RendererPreferences>"); |
1592 } | 1604 } |
1593 }; | 1605 }; |
1594 | 1606 |
(...skipping 699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2294 } | 2306 } |
2295 }; | 2307 }; |
2296 | 2308 |
2297 } // namespace IPC | 2309 } // namespace IPC |
2298 | 2310 |
2299 | 2311 |
2300 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2312 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2301 #include "ipc/ipc_message_macros.h" | 2313 #include "ipc/ipc_message_macros.h" |
2302 | 2314 |
2303 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2315 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |