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.
5 #ifndef CONTENT_SHELL_RENDERER_LEAK_DETECTOR_H_
6 #define CONTENT_SHELL_RENDERER_LEAK_DETECTOR_H_
8 #include "base/basictypes.h"
9 #include "content/shell/common/leak_detection_result.h"
17 // LeakDetector counts DOM objects and compare them between two pages.
22 // Counts DOM objects, compare the previous status and returns the result of
23 // leak detection. It is assumed that this method is always called when a
24 // specific page, like about:blank is loaded to compare the previous
25 // circumstance of DOM objects. If the number of objects increses, there
27 LeakDetectionResult
TryLeakDetection(blink::WebFrame
* frame
);
30 // The number of the live documents last time.
31 unsigned previous_number_of_live_documents_
;
33 // The number of the live nodes last time.
34 unsigned previous_number_of_live_nodes_
;
36 DISALLOW_COPY_AND_ASSIGN(LeakDetector
);
39 } // namespace content
41 #endif // CONTENT_SHELL_RENDERER_LEAK_DETECTOR_H_