LCOV - code coverage report
Current view: top level - docshell/base/timeline - ObservedDocShell.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 1 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
       3             : /* This Source Code Form is subject to the terms of the Mozilla Public
       4             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       5             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       6             : 
       7             : #ifndef mozilla_ObservedDocShell_h_
       8             : #define mozilla_ObservedDocShell_h_
       9             : 
      10             : #include "MarkersStorage.h"
      11             : #include "mozilla/RefPtr.h"
      12             : #include "mozilla/UniquePtr.h"
      13             : #include "nsTArray.h"
      14             : 
      15             : class nsIDocShell;
      16             : 
      17             : namespace mozilla {
      18             : class AbstractTimelineMarker;
      19             : 
      20             : namespace dom {
      21             : struct ProfileTimelineMarker;
      22             : }
      23             : 
      24             : // # ObservedDocShell
      25             : //
      26             : // A wrapper around a docshell for which docshell-specific markers are
      27             : // allowed to exist. See TimelineConsumers for register/unregister logic.
      28           0 : class ObservedDocShell : public MarkersStorage
      29             : {
      30             : private:
      31             :   RefPtr<nsIDocShell> mDocShell;
      32             : 
      33             :   // Main thread only.
      34             :   nsTArray<UniquePtr<AbstractTimelineMarker>> mTimelineMarkers;
      35             :   bool mPopping;
      36             : 
      37             :   // Off the main thread only.
      38             :   nsTArray<UniquePtr<AbstractTimelineMarker>> mOffTheMainThreadTimelineMarkers;
      39             : 
      40             : public:
      41             :   explicit ObservedDocShell(nsIDocShell* aDocShell);
      42             :   nsIDocShell* operator*() const { return mDocShell.get(); }
      43             : 
      44             :   void AddMarker(UniquePtr<AbstractTimelineMarker>&& aMarker) override;
      45             :   void AddOTMTMarker(UniquePtr<AbstractTimelineMarker>&& aMarker) override;
      46             :   void ClearMarkers() override;
      47             :   void PopMarkers(JSContext* aCx, nsTArray<dom::ProfileTimelineMarker>& aStore) override;
      48             : };
      49             : 
      50             : } // namespace mozilla
      51             : 
      52             : #endif /* mozilla_ObservedDocShell_h_ */

Generated by: LCOV version 1.13