2013-01-28 03:08:21 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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 URL_h___
|
|
|
|
#define URL_h___
|
|
|
|
|
|
|
|
#include "nscore.h"
|
2013-08-15 11:17:48 -07:00
|
|
|
#include "nsString.h"
|
2013-01-28 03:08:21 -08:00
|
|
|
|
|
|
|
class nsIDOMBlob;
|
2013-08-15 11:17:48 -07:00
|
|
|
class nsISupports;
|
2013-01-28 03:08:21 -08:00
|
|
|
|
|
|
|
namespace mozilla {
|
2013-02-15 00:04:11 -08:00
|
|
|
|
2013-08-15 11:17:48 -07:00
|
|
|
class ErrorResult;
|
2013-02-15 00:04:11 -08:00
|
|
|
class DOMMediaStream;
|
|
|
|
|
2013-01-28 03:08:21 -08:00
|
|
|
namespace dom {
|
|
|
|
|
2013-06-20 20:15:15 -07:00
|
|
|
class MediaSource;
|
2013-08-15 11:17:48 -07:00
|
|
|
class GlobalObject;
|
|
|
|
struct objectURLOptions;
|
2013-06-20 20:15:15 -07:00
|
|
|
|
2013-01-28 03:08:21 -08:00
|
|
|
class URL MOZ_FINAL
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// WebIDL methods
|
2012-12-03 08:07:49 -08:00
|
|
|
static void CreateObjectURL(const GlobalObject& aGlobal, nsIDOMBlob* aBlob,
|
2013-01-28 03:08:21 -08:00
|
|
|
const objectURLOptions& aOptions,
|
2012-12-03 08:07:49 -08:00
|
|
|
nsString& aResult,
|
2013-01-28 03:08:21 -08:00
|
|
|
ErrorResult& aError);
|
2012-12-03 08:07:49 -08:00
|
|
|
static void CreateObjectURL(const GlobalObject& aGlobal,
|
2013-02-15 00:04:11 -08:00
|
|
|
DOMMediaStream& aStream,
|
2013-01-28 03:08:21 -08:00
|
|
|
const mozilla::dom::objectURLOptions& aOptions,
|
2012-12-03 08:07:49 -08:00
|
|
|
nsString& aResult,
|
2013-01-28 03:08:21 -08:00
|
|
|
mozilla::ErrorResult& aError);
|
2013-06-20 20:15:15 -07:00
|
|
|
static void CreateObjectURL(const GlobalObject& aGlobal,
|
|
|
|
MediaSource& aSource,
|
|
|
|
const objectURLOptions& aOptions,
|
|
|
|
nsString& aResult,
|
|
|
|
mozilla::ErrorResult& aError);
|
2012-12-03 08:07:49 -08:00
|
|
|
static void RevokeObjectURL(const GlobalObject& aGlobal,
|
|
|
|
const nsAString& aURL);
|
2013-01-28 03:08:21 -08:00
|
|
|
|
|
|
|
private:
|
|
|
|
static void CreateObjectURLInternal(nsISupports* aGlobal, nsISupports* aObject,
|
|
|
|
const nsACString& aScheme,
|
|
|
|
const mozilla::dom::objectURLOptions& aOptions,
|
2012-12-03 08:07:49 -08:00
|
|
|
nsString& aResult,
|
2013-01-28 03:08:21 -08:00
|
|
|
mozilla::ErrorResult& aError);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* URL_h___ */
|