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

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

Issue 3173040: Revert 57188 - Add html node info (tag name, attributes, and computed display... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 4 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
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/common/render_messages.h" 5 #include "chrome/common/render_messages.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/common/edit_command.h" 8 #include "chrome/common/edit_command.h"
9 #include "chrome/common/extensions/extension_extent.h" 9 #include "chrome/common/extensions/extension_extent.h"
10 #include "chrome/common/extensions/url_pattern.h" 10 #include "chrome/common/extensions/url_pattern.h"
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 void ParamTraits<webkit_glue::WebAccessibility>::Write(Message* m, 787 void ParamTraits<webkit_glue::WebAccessibility>::Write(Message* m,
788 const param_type& p) { 788 const param_type& p) {
789 WriteParam(m, p.id); 789 WriteParam(m, p.id);
790 WriteParam(m, p.name); 790 WriteParam(m, p.name);
791 WriteParam(m, p.value); 791 WriteParam(m, p.value);
792 WriteParam(m, static_cast<int>(p.role)); 792 WriteParam(m, static_cast<int>(p.role));
793 WriteParam(m, static_cast<int>(p.state)); 793 WriteParam(m, static_cast<int>(p.state));
794 WriteParam(m, p.location); 794 WriteParam(m, p.location);
795 WriteParam(m, p.attributes); 795 WriteParam(m, p.attributes);
796 WriteParam(m, p.children); 796 WriteParam(m, p.children);
797 WriteParam(m, p.html_attributes);
798 } 797 }
799 798
800 bool ParamTraits<webkit_glue::WebAccessibility>::Read( 799 bool ParamTraits<webkit_glue::WebAccessibility>::Read(
801 const Message* m, void** iter, param_type* p) { 800 const Message* m, void** iter, param_type* p) {
802 bool ret = ReadParam(m, iter, &p->id); 801 bool ret = ReadParam(m, iter, &p->id);
803 ret = ret && ReadParam(m, iter, &p->name); 802 ret = ret && ReadParam(m, iter, &p->name);
804 ret = ret && ReadParam(m, iter, &p->value); 803 ret = ret && ReadParam(m, iter, &p->value);
805 int role = -1; 804 int role = -1;
806 ret = ret && ReadParam(m, iter, &role); 805 ret = ret && ReadParam(m, iter, &role);
807 if (role >= webkit_glue::WebAccessibility::ROLE_NONE && 806 if (role >= webkit_glue::WebAccessibility::ROLE_NONE &&
808 role < webkit_glue::WebAccessibility::NUM_ROLES) { 807 role < webkit_glue::WebAccessibility::NUM_ROLES) {
809 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role); 808 p->role = static_cast<webkit_glue::WebAccessibility::Role>(role);
810 } else { 809 } else {
811 p->role = webkit_glue::WebAccessibility::ROLE_NONE; 810 p->role = webkit_glue::WebAccessibility::ROLE_NONE;
812 } 811 }
813 int state = 0; 812 int state = 0;
814 ret = ret && ReadParam(m, iter, &state); 813 ret = ret && ReadParam(m, iter, &state);
815 p->state = static_cast<webkit_glue::WebAccessibility::State>(state); 814 p->state = static_cast<webkit_glue::WebAccessibility::State>(state);
816 ret = ret && ReadParam(m, iter, &p->location); 815 ret = ret && ReadParam(m, iter, &p->location);
817 ret = ret && ReadParam(m, iter, &p->attributes); 816 ret = ret && ReadParam(m, iter, &p->attributes);
818 ret = ret && ReadParam(m, iter, &p->children); 817 ret = ret && ReadParam(m, iter, &p->children);
819 ret = ret && ReadParam(m, iter, &p->html_attributes);
820 return ret; 818 return ret;
821 } 819 }
822 820
823 void ParamTraits<webkit_glue::WebAccessibility>::Log(const param_type& p, 821 void ParamTraits<webkit_glue::WebAccessibility>::Log(const param_type& p,
824 std::string* l) { 822 std::string* l) {
825 l->append("("); 823 l->append("(");
826 LogParam(p.id, l); 824 LogParam(p.id, l);
827 l->append(", "); 825 l->append(", ");
828 LogParam(p.name, l); 826 LogParam(p.name, l);
829 l->append(", "); 827 l->append(", ");
830 LogParam(p.value, l); 828 LogParam(p.value, l);
831 l->append(", "); 829 l->append(", ");
832 LogParam(static_cast<int>(p.role), l); 830 LogParam(static_cast<int>(p.role), l);
833 l->append(", "); 831 l->append(", ");
834 LogParam(static_cast<int>(p.state), l); 832 LogParam(static_cast<int>(p.state), l);
835 l->append(", "); 833 l->append(", ");
836 LogParam(p.location, l); 834 LogParam(p.location, l);
837 l->append(", "); 835 l->append(", ");
838 LogParam(p.attributes, l); 836 LogParam(p.attributes, l);
839 l->append(", "); 837 l->append(", ");
840 LogParam(p.children, l); 838 LogParam(p.children, l);
841 l->append(", ");
842 LogParam(p.html_attributes, l);
843 l->append(")"); 839 l->append(")");
844 } 840 }
845 841
846 } // namespace IPC 842 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | chrome/common/render_messages_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698