gecko-dev/dom/base/nsOpenURIInFrameParams.cpp
Andrea Marchesini 501b078b36 Bug 1278799 - Moving Console API into dom/console, r=smaug
--HG--
rename : dom/base/Console.cpp => dom/console/Console.cpp
rename : dom/base/Console.h => dom/console/Console.h
rename : dom/base/ConsoleAPI.manifest => dom/console/ConsoleAPI.manifest
rename : dom/base/ConsoleAPIStorage.js => dom/console/ConsoleAPIStorage.js
rename : dom/base/ConsoleReportCollector.cpp => dom/console/ConsoleReportCollector.cpp
rename : dom/base/ConsoleReportCollector.h => dom/console/ConsoleReportCollector.h
rename : dom/base/nsIConsoleAPIStorage.idl => dom/console/nsIConsoleAPIStorage.idl
rename : dom/base/nsIConsoleReportCollector.h => dom/console/nsIConsoleReportCollector.h
rename : dom/base/test/test_bug659625.html => dom/console/tests/test_bug659625.html
rename : dom/base/test/test_bug978522.html => dom/console/tests/test_bug978522.html
rename : dom/base/test/test_bug979109.html => dom/console/tests/test_bug979109.html
rename : dom/base/test/test_bug989665.html => dom/console/tests/test_bug989665.html
rename : dom/base/test/test_console.xul => dom/console/tests/test_console.xul
rename : dom/base/test/test_consoleEmptyStack.html => dom/console/tests/test_consoleEmptyStack.html
rename : dom/base/test/test_console_binding.html => dom/console/tests/test_console_binding.html
rename : dom/base/test/test_console_proto.html => dom/console/tests/test_console_proto.html
2016-06-08 14:46:50 +02:00

59 lines
1.5 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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/. */
#include "nsOpenURIInFrameParams.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/dom/ToJSValue.h"
NS_IMPL_ISUPPORTS(nsOpenURIInFrameParams, nsIOpenURIInFrameParams)
nsOpenURIInFrameParams::nsOpenURIInFrameParams(const mozilla::DocShellOriginAttributes& aOriginAttributes)
: mOpenerOriginAttributes(aOriginAttributes)
, mIsPrivate(false)
{
}
nsOpenURIInFrameParams::~nsOpenURIInFrameParams() {
}
NS_IMETHODIMP
nsOpenURIInFrameParams::GetReferrer(nsAString& aReferrer)
{
aReferrer = mReferrer;
return NS_OK;
}
NS_IMETHODIMP
nsOpenURIInFrameParams::SetReferrer(const nsAString& aReferrer)
{
mReferrer = aReferrer;
return NS_OK;
}
NS_IMETHODIMP
nsOpenURIInFrameParams::GetIsPrivate(bool* aIsPrivate)
{
NS_ENSURE_ARG_POINTER(aIsPrivate);
*aIsPrivate = mIsPrivate;
return NS_OK;
}
NS_IMETHODIMP
nsOpenURIInFrameParams::SetIsPrivate(bool aIsPrivate)
{
mIsPrivate = aIsPrivate;
return NS_OK;
}
NS_IMETHODIMP
nsOpenURIInFrameParams::GetOpenerOriginAttributes(JSContext* aCx,
JS::MutableHandle<JS::Value> aValue)
{
bool ok = ToJSValue(aCx, mOpenerOriginAttributes, aValue);
NS_ENSURE_TRUE(ok, NS_ERROR_FAILURE);
return NS_OK;
}