widget/cocoa/nsIdleServiceX.h
author ffxbld
Wed, 14 Aug 2013 09:12:20 -0400
branchGECKO2301_2013081409_RELBRANCH
changeset 144018 d6b5b6b8777f6658b8c3a2849f3c0349614dad1c
parent 108991 a16372ce30b5f6b747246b01fcd215a4bf3b6342
child 145246 0f04bc2cf58697dadef08c321dfc2c3479230244
permissions -rw-r--r--
Added FIREFOX_23_0_1_RELEASE FIREFOX_23_0_1_BUILD1 tag(s) for changeset a55c55edf302. DONTBUILD CLOSED TREE a=release

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef nsIdleServiceX_h_
#define nsIdleServiceX_h_

#include "nsIdleService.h"

class nsIdleServiceX : public nsIdleService
{
public:
  NS_DECL_ISUPPORTS_INHERITED

  bool PollIdleTime(uint32_t* aIdleTime);

  static already_AddRefed<nsIdleServiceX> GetInstance() 
  {
    nsIdleServiceX* idleService = 
      static_cast<nsIdleServiceX*>(nsIdleService::GetInstance().get());
    if (!idleService) {
      idleService = new nsIdleServiceX();
      NS_ADDREF(idleService);
    }
    
    return idleService;
  }
  
protected:
    nsIdleServiceX() { }
    virtual ~nsIdleServiceX() { }
    bool UsePollMode();
};

#endif // nsIdleServiceX_h_