Index: content/renderer/dom_utils.h |
diff --git a/content/renderer/dom_utils.h b/content/renderer/dom_utils.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..48dd2e3cd15a33bd192e40aff45e6a7786e2aaa4 |
--- /dev/null |
+++ b/content/renderer/dom_utils.h |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2014 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_DOM_UTILS_H_ |
+#define CONTENT_RENDERER_DOM_UTILS_H_ |
+ |
+namespace blink { |
+class WebNode; |
+} |
+ |
+namespace content { |
+ |
+class DomUtils { |
+ public: |
+ // Walks up the DOM, looking for the first parent that represents an <a>. |
+ // Returns a null WebNode if no such <a> exists. |
+ static blink::WebNode ExtractParentAnchorNode(const blink::WebNode& node); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_RENDERER_DOM_UTILS_H_ |