2009-02-13 22:41:12 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04: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 22:41:12 +03:00
|
|
|
|
2011-08-09 06:37:57 +04:00
|
|
|
#include "nsShellService.h"
|
2011-02-27 22:39:49 +03:00
|
|
|
#include "nsString.h"
|
2009-02-13 22:41:12 +03:00
|
|
|
|
2012-07-11 03:54:09 +04:00
|
|
|
#include "AndroidBridge.h"
|
|
|
|
|
2011-08-09 06:37:57 +04:00
|
|
|
NS_IMPL_ISUPPORTS1(nsShellService, nsIShellService)
|
2009-02-13 22:41:12 +03:00
|
|
|
|
2009-09-23 20:09:54 +04:00
|
|
|
NS_IMETHODIMP
|
2011-08-09 06:37:57 +04:00
|
|
|
nsShellService::SwitchTask()
|
2009-09-23 20:09:54 +04:00
|
|
|
{
|
|
|
|
return NS_ERROR_NOT_IMPLEMENTED;
|
|
|
|
}
|
2011-08-09 06:37:57 +04: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;
|
|
|
|
}
|