2009-02-13 11:41:12 -08:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 04:12:37 -07:00
|
|
|
/* 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/. */
|
2009-02-13 11:41:12 -08:00
|
|
|
|
2011-08-08 19:37:57 -07:00
|
|
|
#include "nsShellService.h"
|
2011-02-27 11:39:49 -08:00
|
|
|
#include "nsString.h"
|
2009-02-13 11:41:12 -08:00
|
|
|
|
2012-07-10 16:54:09 -07:00
|
|
|
#include "AndroidBridge.h"
|
|
|
|
|
2011-08-08 19:37:57 -07:00
|
|
|
NS_IMPL_ISUPPORTS1(nsShellService, nsIShellService)
|
2009-02-13 11:41:12 -08:00
|
|
|
|
2009-09-23 09:09:54 -07:00
|
|
|
NS_IMETHODIMP
|
2011-08-08 19:37:57 -07:00
|
|
|
nsShellService::SwitchTask()
|
2009-09-23 09:09:54 -07:00
|
|
|
{
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
2011-08-08 19:37:57 -07:00
|
|
|
|
|
|
|
NS_IMETHODIMP
|
|
|
|
nsShellService::CreateShortcut(const nsAString& aTitle, const nsAString& aURI, const nsAString& aIconData, const nsAString& aIntent)
|
|
|
|
{
|
|
|
|
if (!aTitle.Length() || !aURI.Length() || !aIconData.Length())
|
|
|
|
return NS_ERROR_FAILURE;
|
|
|
|
|
|
|
|
mozilla::AndroidBridge::Bridge()->CreateShortcut(aTitle, aURI, aIconData, aIntent);
|
|
|
|
return NS_OK;
|
|
|
|
}
|