| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 public: | 60 public: |
| 61 explicit WebLeakDetectorImpl(WebLeakDetectorClient* client) | 61 explicit WebLeakDetectorImpl(WebLeakDetectorClient* client) |
| 62 : m_client(client) | 62 : m_client(client) |
| 63 , m_delayedGCAndReportTimer(this, &WebLeakDetectorImpl::delayedGCAndRepo
rt) | 63 , m_delayedGCAndReportTimer(this, &WebLeakDetectorImpl::delayedGCAndRepo
rt) |
| 64 , m_delayedReportTimer(this, &WebLeakDetectorImpl::delayedReport) | 64 , m_delayedReportTimer(this, &WebLeakDetectorImpl::delayedReport) |
| 65 , m_numberOfGCNeeded(0) | 65 , m_numberOfGCNeeded(0) |
| 66 { | 66 { |
| 67 ASSERT(m_client); | 67 ASSERT(m_client); |
| 68 } | 68 } |
| 69 | 69 |
| 70 virtual ~WebLeakDetectorImpl() { } | 70 ~WebLeakDetectorImpl() override {} |
| 71 | 71 |
| 72 virtual void collectGarbageAndGetDOMCounts(WebLocalFrame*) override; | 72 void collectGarbageAndGetDOMCounts(WebLocalFrame*) override; |
| 73 | 73 |
| 74 private: | 74 private: |
| 75 void delayedGCAndReport(Timer<WebLeakDetectorImpl>*); | 75 void delayedGCAndReport(Timer<WebLeakDetectorImpl>*); |
| 76 void delayedReport(Timer<WebLeakDetectorImpl>*); | 76 void delayedReport(Timer<WebLeakDetectorImpl>*); |
| 77 | 77 |
| 78 WebLeakDetectorClient* m_client; | 78 WebLeakDetectorClient* m_client; |
| 79 Timer<WebLeakDetectorImpl> m_delayedGCAndReportTimer; | 79 Timer<WebLeakDetectorImpl> m_delayedGCAndReportTimer; |
| 80 Timer<WebLeakDetectorImpl> m_delayedReportTimer; | 80 Timer<WebLeakDetectorImpl> m_delayedReportTimer; |
| 81 int m_numberOfGCNeeded; | 81 int m_numberOfGCNeeded; |
| 82 }; | 82 }; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 } | 146 } |
| 147 | 147 |
| 148 } // namespace | 148 } // namespace |
| 149 | 149 |
| 150 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) | 150 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) |
| 151 { | 151 { |
| 152 return new WebLeakDetectorImpl(client); | 152 return new WebLeakDetectorImpl(client); |
| 153 } | 153 } |
| 154 | 154 |
| 155 } // namespace blink | 155 } // namespace blink |
| OLD | NEW |