Chromium Code Reviews| Index: content/renderer/accessibility_node_serializer.h |
| diff --git a/content/renderer/accessibility_node_serializer.h b/content/renderer/accessibility_node_serializer.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..9b472be254097e9b25e3d72ac1f8c85a454e28c1 |
| --- /dev/null |
| +++ b/content/renderer/accessibility_node_serializer.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_RENDERER_ACCESSIBILITY_NODE_SERIALIZER_H_ |
| +#define CONTENT_RENDERER_ACCESSIBILITY_NODE_SERIALIZER_H_ |
| +#pragma once |
| + |
| +#include "content/common/accessibility_node_data.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObject.h" |
| + |
| +namespace content { |
| + |
| +class AccessibilityNodeSerializer { |
|
jam
2012/06/12 00:00:42
nit: why a class instead of just having this be co
dmazzoni
2012/06/12 18:35:33
Mainly to encapsulate the enums, so I'm fine with
|
| + public: |
| + enum IncludeChildren { |
|
jam
2012/06/12 00:00:42
nit: i realize you're just moving this, and in Web
dmazzoni
2012/06/12 18:35:33
The style guide specifically suggests using enums
jam
2012/06/12 21:01:52
That's the first time I hear this, and this change
|
| + NO_CHILDREN, |
| + INCLUDE_CHILDREN |
| + }; |
| + |
| + enum IncludeLineBreaks { |
| + NO_LINE_BREAKS, |
| + INCLUDE_LINE_BREAKS |
| + }; |
| + |
| + static void Serialize(const WebKit::WebAccessibilityObject& src, |
| + AccessibilityNodeData* dst, |
| + IncludeChildren include_children, |
| + IncludeLineBreaks include_line_breaks); |
| + |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_ACCESSIBILITY_NODE_SERIALIZER_H_ |