Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: chrome/common/render_messages.h

Issue 2121004: Windows accessibility improvements: 1. All WebKit roles are now passed to the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after
2591 } 2591 }
2592 }; 2592 };
2593 2593
2594 template <> 2594 template <>
2595 struct ParamTraits<webkit_glue::WebAccessibility> { 2595 struct ParamTraits<webkit_glue::WebAccessibility> {
2596 typedef webkit_glue::WebAccessibility param_type; 2596 typedef webkit_glue::WebAccessibility param_type;
2597 static void Write(Message* m, const param_type& p) { 2597 static void Write(Message* m, const param_type& p) {
2598 WriteParam(m, p.id); 2598 WriteParam(m, p.id);
2599 WriteParam(m, p.name); 2599 WriteParam(m, p.name);
2600 WriteParam(m, p.value); 2600 WriteParam(m, p.value);
2601 WriteParam(m, p.action);
2602 WriteParam(m, p.description);
2603 WriteParam(m, p.help);
2604 WriteParam(m, p.shortcut);
2605 WriteParam(m, static_cast<int>(p.role)); 2601 WriteParam(m, static_cast<int>(p.role));
2606 WriteParam(m, static_cast<int>(p.state)); 2602 WriteParam(m, static_cast<int>(p.state));
2607 WriteParam(m, p.location); 2603 WriteParam(m, p.location);
2604 WriteParam(m, p.attributes);
2608 WriteParam(m, p.children); 2605 WriteParam(m, p.children);
2609 } 2606 }
2610 static bool Read(const Message* m, void** iter, param_type* p) { 2607 static bool Read(const Message* m, void** iter, param_type* p) {
2611 bool ret = ReadParam(m, iter, &p->id); 2608 bool ret = ReadParam(m, iter, &p->id);
2612 ret = ret && ReadParam(m, iter, &p->name); 2609 ret = ret && ReadParam(m, iter, &p->name);
2613 ret = ret && ReadParam(m, iter, &p->value); 2610 ret = ret && ReadParam(m, iter, &p->value);
2614 ret = ret && ReadParam(m, iter, &p->action);
2615 ret = ret && ReadParam(m, iter, &p->description);
2616 ret = ret && ReadParam(m, iter, &p->help);
2617 ret = ret && ReadParam(m, iter, &p->shortcut);
2618 int role = -1; 2611 int role = -1;
2619 ret = ret && ReadParam(m, iter, &role); 2612 ret = ret && ReadParam(m, iter, &role);
2620 if (role >= webkit_glue::WebAccessibility::ROLE_NONE && 2613 if (role >= webkit_glue::WebAccessibility::ROLE_NONE &&
2621 role < webkit_glue::WebAccessibility::NUM_ROLES) { 2614 role < webkit_glue::WebAccessibility::NUM_ROLES) {
2622 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role); 2615 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role);
2623 } else { 2616 } else {
2624 p->role = webkit_glue::WebAccessibility::ROLE_NONE; 2617 p->role = webkit_glue::WebAccessibility::ROLE_NONE;
2625 } 2618 }
2626 int state = 0; 2619 int state = 0;
2627 ret = ret && ReadParam(m, iter, &state); 2620 ret = ret && ReadParam(m, iter, &state);
2628 p->state = static_cast<webkit_glue::WebAccessibility::State>(state); 2621 p->state = static_cast<webkit_glue::WebAccessibility::State>(state);
2629 ret = ret && ReadParam(m, iter, &p->location); 2622 ret = ret && ReadParam(m, iter, &p->location);
2623 ret = ret && ReadParam(m, iter, &p->attributes);
2630 ret = ret && ReadParam(m, iter, &p->children); 2624 ret = ret && ReadParam(m, iter, &p->children);
2631 return ret; 2625 return ret;
2632 } 2626 }
2633 static void Log(const param_type& p, std::wstring* l) { 2627 static void Log(const param_type& p, std::wstring* l) {
2634 l->append(L"("); 2628 l->append(L"(");
2635 LogParam(p.id, l); 2629 LogParam(p.id, l);
2636 l->append(L", "); 2630 l->append(L", ");
2637 LogParam(p.name, l); 2631 LogParam(p.name, l);
2638 l->append(L", "); 2632 l->append(L", ");
2639 LogParam(p.value, l); 2633 LogParam(p.value, l);
2640 l->append(L", "); 2634 l->append(L", ");
2641 LogParam(p.action, l);
2642 l->append(L", ");
2643 LogParam(p.description, l);
2644 l->append(L", ");
2645 LogParam(p.help, l);
2646 l->append(L", ");
2647 LogParam(p.shortcut, l);
2648 l->append(L", ");
2649 LogParam(static_cast<int>(p.role), l); 2635 LogParam(static_cast<int>(p.role), l);
2650 l->append(L", "); 2636 l->append(L", ");
2651 LogParam(static_cast<int>(p.state), l); 2637 LogParam(static_cast<int>(p.state), l);
2652 l->append(L", "); 2638 l->append(L", ");
2653 LogParam(p.location, l); 2639 LogParam(p.location, l);
2654 l->append(L", "); 2640 l->append(L", ");
2641 LogParam(p.attributes, l);
2642 l->append(L", ");
2655 LogParam(p.children, l); 2643 LogParam(p.children, l);
2656 l->append(L")"); 2644 l->append(L")");
2657 } 2645 }
2658 }; 2646 };
2659 2647
2660 } // namespace IPC 2648 } // namespace IPC
2661 2649
2662 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 2650 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
2663 #include "ipc/ipc_message_macros.h" 2651 #include "ipc/ipc_message_macros.h"
2664 2652
2665 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 2653 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_widget_host_view_win.cc ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698