LCOV - code coverage report
Current view: top level - dom/workers - ServiceWorkerWindowClient.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 11 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 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 file,
       5             :  * You can obtain one at http://mozilla.org/MPL/2.0/.
       6             :  */
       7             : 
       8             : #ifndef mozilla_dom_workers_serviceworkerwindowclient_h
       9             : #define mozilla_dom_workers_serviceworkerwindowclient_h
      10             : 
      11             : #include "ServiceWorkerClient.h"
      12             : 
      13             : namespace mozilla {
      14             : namespace dom {
      15             : 
      16             : class Promise;
      17             : 
      18             : namespace workers {
      19             : 
      20             : class ServiceWorkerWindowClient final : public ServiceWorkerClient
      21             : {
      22             : public:
      23           0 :   ServiceWorkerWindowClient(nsISupports* aOwner,
      24             :                             const ServiceWorkerClientInfo& aClientInfo)
      25           0 :     : ServiceWorkerClient(aOwner, aClientInfo),
      26           0 :       mVisibilityState(aClientInfo.mVisibilityState),
      27           0 :       mFocused(aClientInfo.mFocused)
      28             :   {
      29           0 :   }
      30             : 
      31             :   virtual JSObject*
      32             :   WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
      33             : 
      34             :   mozilla::dom::VisibilityState
      35           0 :   VisibilityState() const
      36             :   {
      37           0 :     return mVisibilityState;
      38             :   }
      39             : 
      40             :   bool
      41           0 :   Focused() const
      42             :   {
      43           0 :     return mFocused;
      44             :   }
      45             : 
      46             :   already_AddRefed<Promise>
      47             :   Focus(ErrorResult& aRv) const;
      48             : 
      49             :   already_AddRefed<Promise>
      50             :   Navigate(const nsAString& aUrl,  ErrorResult& aRv);
      51             : 
      52             : private:
      53           0 :   ~ServiceWorkerWindowClient()
      54           0 :   { }
      55             : 
      56             :   mozilla::dom::VisibilityState mVisibilityState;
      57             :   bool mFocused;
      58             : };
      59             : 
      60             : } // namespace workers
      61             : } // namespace dom
      62             : } // namespace mozilla
      63             : 
      64             : #endif // mozilla_dom_workers_serviceworkerwindowclient_h

Generated by: LCOV version 1.13