dom/media/MediaPermissionGonk.h
author Mike Hommey <mh+mozilla@glandium.org>
Thu, 26 Mar 2015 12:07:17 +0900
changeset 258314 fc1e894eec2fbd34b745cd94f505080427d24705
parent 213515 4d276769e9ddc88d2dd2912f448116c9efba042e
child 284279 91d6e262b662a0b4e47358665e222d3927337af9
permissions -rw-r--r--
Bug 1147207 - Add a ComposedFinder class that acts like a FileFinder proxy over multiple FileFinders. r=gps, a=sledru

/* 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 DOM_MEDIA_MEDIAPERMISSIONGONK_H
#define DOM_MEDIA_MEDIAPERMISSIONGONK_H

#include "nsError.h"
#include "nsIObserver.h"
#include "nsISupportsImpl.h"
#include "GetUserMediaRequest.h"

namespace mozilla {

/**
 * The observer to create the MediaPermissionMgr. This is the entry point of
 * permission request on b2g.
 */
class MediaPermissionManager : public nsIObserver
{
public:
  NS_DECL_ISUPPORTS
  NS_DECL_NSIOBSERVER

  static MediaPermissionManager* GetInstance();

protected:
  virtual ~MediaPermissionManager();

private:
  MediaPermissionManager();
  nsresult Deinit();
  nsresult HandleRequest(nsRefPtr<dom::GetUserMediaRequest> &req);
};

} // namespace mozilla
#endif // DOM_MEDIA_MEDIAPERMISSIONGONK_H