1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/plugins/base/nsPluginPlayPreviewInfo.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsPluginPlayPreviewInfo.h" 1.10 + 1.11 +using namespace mozilla; 1.12 + 1.13 +nsPluginPlayPreviewInfo::nsPluginPlayPreviewInfo(const char* aMimeType, 1.14 + bool aIgnoreCTP, 1.15 + const char* aRedirectURL) 1.16 + : mMimeType(aMimeType), mIgnoreCTP(aIgnoreCTP), mRedirectURL(aRedirectURL) {} 1.17 + 1.18 +nsPluginPlayPreviewInfo::nsPluginPlayPreviewInfo( 1.19 + const nsPluginPlayPreviewInfo* aSource) 1.20 +{ 1.21 + MOZ_ASSERT(aSource); 1.22 + 1.23 + mMimeType = aSource->mMimeType; 1.24 + mIgnoreCTP = aSource->mIgnoreCTP; 1.25 + mRedirectURL = aSource->mRedirectURL; 1.26 +} 1.27 + 1.28 +nsPluginPlayPreviewInfo::~nsPluginPlayPreviewInfo() 1.29 +{ 1.30 +} 1.31 + 1.32 +NS_IMPL_ISUPPORTS(nsPluginPlayPreviewInfo, nsIPluginPlayPreviewInfo) 1.33 + 1.34 +NS_IMETHODIMP 1.35 +nsPluginPlayPreviewInfo::GetMimeType(nsACString& aMimeType) 1.36 +{ 1.37 + aMimeType = mMimeType; 1.38 + return NS_OK; 1.39 +} 1.40 + 1.41 +NS_IMETHODIMP 1.42 +nsPluginPlayPreviewInfo::GetIgnoreCTP(bool* aIgnoreCTP) 1.43 +{ 1.44 + *aIgnoreCTP = mIgnoreCTP; 1.45 + return NS_OK; 1.46 +} 1.47 + 1.48 +NS_IMETHODIMP 1.49 +nsPluginPlayPreviewInfo::GetRedirectURL(nsACString& aRedirectURL) 1.50 +{ 1.51 + aRedirectURL = mRedirectURL; 1.52 + return NS_OK; 1.53 +}