dom/system/gonk/SystemWorkerManager.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
     2 /* vim: set ts=2 et sw=2 tw=40: */
     3 /* Copyright 2012 Mozilla Foundation and Mozilla contributors
     4  *
     5  * Licensed under the Apache License, Version 2.0 (the "License");
     6  * you may not use this file except in compliance with the License.
     7  * You may obtain a copy of the License at
     8  *
     9  *     http://www.apache.org/licenses/LICENSE-2.0
    10  *
    11  * Unless required by applicable law or agreed to in writing, software
    12  * distributed under the License is distributed on an "AS IS" BASIS,
    13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  * See the License for the specific language governing permissions and
    15  * limitations under the License.
    16  */
    18 #ifndef mozilla_dom_system_b2g_systemworkermanager_h__
    19 #define mozilla_dom_system_b2g_systemworkermanager_h__
    21 #include "nsIInterfaceRequestor.h"
    22 #include "nsISystemWorkerManager.h"
    23 #include "nsIObserver.h"
    24 #include "nsAutoPtr.h"
    25 #include "nsCOMPtr.h"
    26 #include "nsXULAppAPI.h" // For XRE_GetProcessType
    28 class nsIWorkerHolder;
    30 namespace mozilla {
    32 namespace ipc {
    33   class KeyStore;
    34 }
    36 namespace dom {
    37 namespace gonk {
    39 class SystemWorkerManager : public nsIObserver,
    40                             public nsIInterfaceRequestor,
    41                             public nsISystemWorkerManager
    42 {
    43 public:
    44   NS_DECL_ISUPPORTS
    45   NS_DECL_NSIOBSERVER
    46   NS_DECL_NSIINTERFACEREQUESTOR
    47   NS_DECL_NSISYSTEMWORKERMANAGER
    49   nsresult Init();
    50   void Shutdown();
    52   static already_AddRefed<SystemWorkerManager>
    53   FactoryCreate();
    55   static nsIInterfaceRequestor*
    56   GetInterfaceRequestor();
    58 private:
    59   SystemWorkerManager();
    60   ~SystemWorkerManager();
    62   nsresult InitWifi(JSContext *cx);
    63   nsresult InitKeyStore(JSContext *cx);
    65   nsCOMPtr<nsIWorkerHolder> mWifiWorker;
    67   nsRefPtr<ipc::KeyStore> mKeyStore;
    69   bool mShutdown;
    70 };
    72 }
    73 }
    74 }
    76 #endif // mozilla_dom_system_b2g_systemworkermanager_h__

mercurial