1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CONTENT_RENDERER_DOM_UTILS_H_ 6 #define CONTENT_RENDERER_DOM_UTILS_H_ 7 8 namespace blink { 9 class WebNode; 10 } 11 12 namespace content { 13 14 class DomUtils { 15 public: 16 // Walks up the DOM, looking for the first parent that represents an <a>. 17 // Returns a null WebNode if no such <a> exists. 18 static blink::WebNode ExtractParentAnchorNode(const blink::WebNode& node); 19 }; 20 21 } // namespace content 22 23 #endif // CONTENT_RENDERER_DOM_UTILS_H_ 24