OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/renderer/safe_browsing/malware_dom_details.h" | 5 #include "chrome/renderer/safe_browsing/malware_dom_details.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "chrome/common/chrome_constants.h" | 8 #include "chrome/common/chrome_constants.h" |
9 #include "chrome/common/safe_browsing/safebrowsing_messages.h" | 9 #include "chrome/common/safe_browsing/safebrowsing_messages.h" |
10 #include "content/public/renderer/render_view.h" | 10 #include "content/public/renderer/render_view.h" |
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeCollection.h" | 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNodeCollection.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
17 | 17 |
18 namespace safe_browsing { | 18 namespace safe_browsing { |
19 | 19 |
20 // An upper limit on the number of nodes we collect. | 20 // An upper limit on the number of nodes we collect. |
21 uint32 MalwareDOMDetails::kMaxNodes = 500; | 21 uint32 MalwareDOMDetails::kMaxNodes = 500; |
22 | 22 |
23 // static | 23 // static |
24 MalwareDOMDetails* MalwareDOMDetails::Create(content::RenderView* render_view) { | 24 MalwareDOMDetails* MalwareDOMDetails::Create(content::RenderView* render_view) { |
25 // Private constructor and public static Create() method to facilitate | 25 // Private constructor and public static Create() method to facilitate |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 111 |
112 // Create the child node. | 112 // Create the child node. |
113 SafeBrowsingHostMsg_MalwareDOMDetails_Node child_node; | 113 SafeBrowsingHostMsg_MalwareDOMDetails_Node child_node; |
114 child_node.url = child_url; | 114 child_node.url = child_url; |
115 child_node.tag_name = element.tagName().utf8(); | 115 child_node.tag_name = element.tagName().utf8(); |
116 child_node.parent = parent_node->url; | 116 child_node.parent = parent_node->url; |
117 resources->push_back(child_node); | 117 resources->push_back(child_node); |
118 } | 118 } |
119 | 119 |
120 } // namespace safe_browsing | 120 } // namespace safe_browsing |
OLD | NEW |