1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/embedding/tests/winEmbed/WindowCreator.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,53 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* ***** BEGIN LICENSE BLOCK ***** 1.6 + * Version: Mozilla-sample-code 1.0 1.7 + * 1.8 + * Copyright (c) 2002 Netscape Communications Corporation and 1.9 + * other contributors 1.10 + * 1.11 + * Permission is hereby granted, free of charge, to any person obtaining a 1.12 + * copy of this Mozilla sample software and associated documentation files 1.13 + * (the "Software"), to deal in the Software without restriction, including 1.14 + * without limitation the rights to use, copy, modify, merge, publish, 1.15 + * distribute, sublicense, and/or sell copies of the Software, and to permit 1.16 + * persons to whom the Software is furnished to do so, subject to the 1.17 + * following conditions: 1.18 + * 1.19 + * The above copyright notice and this permission notice shall be included 1.20 + * in all copies or substantial portions of the Software. 1.21 + * 1.22 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1.23 + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1.24 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1.25 + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1.26 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1.27 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1.28 + * DEALINGS IN THE SOFTWARE. 1.29 + * 1.30 + * Contributor(s): 1.31 + * 1.32 + * ***** END LICENSE BLOCK ***** */ 1.33 + 1.34 +#include "nsIWebBrowserChrome.h" 1.35 +#include "WindowCreator.h" 1.36 +#include "winEmbed.h" 1.37 + 1.38 +WindowCreator::WindowCreator() 1.39 +{ 1.40 +} 1.41 + 1.42 +WindowCreator::~WindowCreator() 1.43 +{ 1.44 +} 1.45 + 1.46 +NS_IMPL_ISUPPORTS(WindowCreator, nsIWindowCreator) 1.47 + 1.48 +NS_IMETHODIMP 1.49 +WindowCreator::CreateChromeWindow(nsIWebBrowserChrome *parent, 1.50 + uint32_t chromeFlags, 1.51 + nsIWebBrowserChrome **_retval) 1.52 +{ 1.53 + NS_ENSURE_ARG_POINTER(_retval); 1.54 + AppCallbacks::CreateBrowserWindow(int32_t(chromeFlags), parent, _retval); 1.55 + return *_retval ? NS_OK : NS_ERROR_FAILURE; 1.56 +}