2013-01-28 11:08:21 +00: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"
|
|
|
|
#include "mozilla/dom/URLBinding.h"
|
|
|
|
|
|
|
|
class nsIDOMBlob;
|
|
|
|
|
|
|
|
namespace mozilla {
|
2013-02-15 08:04:11 +00:00
|
|
|
|
|
|
|
class DOMMediaStream;
|
|
|
|
|
2013-01-28 11:08:21 +00:00
|
|
|
namespace dom {
|
|
|
|
|
2013-06-21 03:15:15 +00:00
|
|
|
class MediaSource;
|
|
|
|
|
2013-01-28 11:08:21 +00:00
|
|
|
class URL MOZ_FINAL
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
// WebIDL methods
|
2012-12-03 16:07:49 +00:00
|
|
|
static void CreateObjectURL(const GlobalObject& aGlobal, nsIDOMBlob* aBlob,
|
2013-01-28 11:08:21 +00:00
|
|
|
const objectURLOptions& aOptions,
|
2012-12-03 16:07:49 +00:00
|
|
|
nsString& aResult,
|
2013-01-28 11:08:21 +00:00
|
|
|
ErrorResult& aError);
|
2012-12-03 16:07:49 +00:00
|
|
|
static void CreateObjectURL(const GlobalObject& aGlobal,
|
2013-02-15 08:04:11 +00:00
|
|
|
DOMMediaStream& aStream,
|
2013-01-28 11:08:21 +00:00
|
|
|
const mozilla::dom::objectURLOptions& aOptions,
|
2012-12-03 16:07:49 +00:00
|
|
|
nsString& aResult,
|
2013-01-28 11:08:21 +00:00
|
|
|
mozilla::ErrorResult& aError);
|
2013-06-21 03:15:15 +00:00
|
|
|
static void CreateObjectURL(const GlobalObject& aGlobal,
|
|
|
|
MediaSource& aSource,
|
|
|
|
const objectURLOptions& aOptions,
|
|
|
|
nsString& aResult,
|
|
|
|
mozilla::ErrorResult& aError);
|
2012-12-03 16:07:49 +00:00
|
|
|
static void RevokeObjectURL(const GlobalObject& aGlobal,
|
|
|
|
const nsAString& aURL);
|
2013-01-28 11:08:21 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
static void CreateObjectURLInternal(nsISupports* aGlobal, nsISupports* aObject,
|
|
|
|
const nsACString& aScheme,
|
|
|
|
const mozilla::dom::objectURLOptions& aOptions,
|
2012-12-03 16:07:49 +00:00
|
|
|
nsString& aResult,
|
2013-01-28 11:08:21 +00:00
|
|
|
mozilla::ErrorResult& aError);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* URL_h___ */
|