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 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1594 typedef RendererPreferences param_type; | 1594 typedef RendererPreferences param_type; |
1595 static void Write(Message* m, const param_type& p) { | 1595 static void Write(Message* m, const param_type& p) { |
1596 WriteParam(m, p.can_accept_load_drops); | 1596 WriteParam(m, p.can_accept_load_drops); |
1597 WriteParam(m, p.should_antialias_text); | 1597 WriteParam(m, p.should_antialias_text); |
1598 WriteParam(m, static_cast<int>(p.hinting)); | 1598 WriteParam(m, static_cast<int>(p.hinting)); |
1599 WriteParam(m, static_cast<int>(p.subpixel_rendering)); | 1599 WriteParam(m, static_cast<int>(p.subpixel_rendering)); |
1600 WriteParam(m, p.focus_ring_color); | 1600 WriteParam(m, p.focus_ring_color); |
1601 WriteParam(m, p.thumb_active_color); | 1601 WriteParam(m, p.thumb_active_color); |
1602 WriteParam(m, p.thumb_inactive_color); | 1602 WriteParam(m, p.thumb_inactive_color); |
1603 WriteParam(m, p.track_color); | 1603 WriteParam(m, p.track_color); |
| 1604 WriteParam(m, p.active_selection_bg_color); |
| 1605 WriteParam(m, p.active_selection_fg_color); |
| 1606 WriteParam(m, p.inactive_selection_bg_color); |
| 1607 WriteParam(m, p.inactive_selection_fg_color); |
1604 WriteParam(m, p.browser_handles_top_level_requests); | 1608 WriteParam(m, p.browser_handles_top_level_requests); |
1605 } | 1609 } |
1606 static bool Read(const Message* m, void** iter, param_type* p) { | 1610 static bool Read(const Message* m, void** iter, param_type* p) { |
1607 if (!ReadParam(m, iter, &p->can_accept_load_drops)) | 1611 if (!ReadParam(m, iter, &p->can_accept_load_drops)) |
1608 return false; | 1612 return false; |
1609 if (!ReadParam(m, iter, &p->should_antialias_text)) | 1613 if (!ReadParam(m, iter, &p->should_antialias_text)) |
1610 return false; | 1614 return false; |
1611 | 1615 |
1612 int hinting = 0; | 1616 int hinting = 0; |
1613 if (!ReadParam(m, iter, &hinting)) | 1617 if (!ReadParam(m, iter, &hinting)) |
1614 return false; | 1618 return false; |
1615 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); | 1619 p->hinting = static_cast<RendererPreferencesHintingEnum>(hinting); |
1616 | 1620 |
1617 int subpixel_rendering = 0; | 1621 int subpixel_rendering = 0; |
1618 if (!ReadParam(m, iter, &subpixel_rendering)) | 1622 if (!ReadParam(m, iter, &subpixel_rendering)) |
1619 return false; | 1623 return false; |
1620 p->subpixel_rendering = | 1624 p->subpixel_rendering = |
1621 static_cast<RendererPreferencesSubpixelRenderingEnum>( | 1625 static_cast<RendererPreferencesSubpixelRenderingEnum>( |
1622 subpixel_rendering); | 1626 subpixel_rendering); |
1623 | 1627 |
1624 int focus_ring_color; | 1628 int focus_ring_color; |
1625 if (!ReadParam(m, iter, &focus_ring_color)) | 1629 if (!ReadParam(m, iter, &focus_ring_color)) |
1626 return false; | 1630 return false; |
1627 p->focus_ring_color = focus_ring_color; | 1631 p->focus_ring_color = focus_ring_color; |
1628 | 1632 |
1629 int thumb_active_color, thumb_inactive_color, track_color; | 1633 int thumb_active_color, thumb_inactive_color, track_color; |
| 1634 int active_selection_bg_color, active_selection_fg_color; |
| 1635 int inactive_selection_bg_color, inactive_selection_fg_color; |
1630 if (!ReadParam(m, iter, &thumb_active_color) || | 1636 if (!ReadParam(m, iter, &thumb_active_color) || |
1631 !ReadParam(m, iter, &thumb_inactive_color) || | 1637 !ReadParam(m, iter, &thumb_inactive_color) || |
1632 !ReadParam(m, iter, &track_color)) | 1638 !ReadParam(m, iter, &track_color) || |
| 1639 !ReadParam(m, iter, &active_selection_bg_color) || |
| 1640 !ReadParam(m, iter, &active_selection_fg_color) || |
| 1641 !ReadParam(m, iter, &inactive_selection_bg_color) || |
| 1642 !ReadParam(m, iter, &inactive_selection_fg_color)) |
1633 return false; | 1643 return false; |
1634 p->thumb_active_color = thumb_active_color; | 1644 p->thumb_active_color = thumb_active_color; |
1635 p->thumb_inactive_color = thumb_inactive_color; | 1645 p->thumb_inactive_color = thumb_inactive_color; |
1636 p->track_color = track_color; | 1646 p->track_color = track_color; |
| 1647 p->active_selection_bg_color = active_selection_bg_color; |
| 1648 p->active_selection_fg_color = active_selection_fg_color; |
| 1649 p->inactive_selection_bg_color = inactive_selection_bg_color; |
| 1650 p->inactive_selection_fg_color = inactive_selection_fg_color; |
1637 | 1651 |
1638 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) | 1652 if (!ReadParam(m, iter, &p->browser_handles_top_level_requests)) |
1639 return false; | 1653 return false; |
1640 | 1654 |
1641 return true; | 1655 return true; |
1642 } | 1656 } |
1643 static void Log(const param_type& p, std::wstring* l) { | 1657 static void Log(const param_type& p, std::wstring* l) { |
1644 l->append(L"<RendererPreferences>"); | 1658 l->append(L"<RendererPreferences>"); |
1645 } | 1659 } |
1646 }; | 1660 }; |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2423 } | 2437 } |
2424 }; | 2438 }; |
2425 | 2439 |
2426 } // namespace IPC | 2440 } // namespace IPC |
2427 | 2441 |
2428 | 2442 |
2429 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" | 2443 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" |
2430 #include "ipc/ipc_message_macros.h" | 2444 #include "ipc/ipc_message_macros.h" |
2431 | 2445 |
2432 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ | 2446 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ |
OLD | NEW |