Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/accessible/xpcom/xpcAccessibleApplication.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim: set ts=2 et sw=2 tw=80: */
3
/* This Source Code Form is subject to the terms of the Mozilla Public
4
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5
 * You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7
#include "xpcAccessibleApplication.h"
8
9
#include "ApplicationAccessible.h"
10
11
using namespace mozilla::a11y;
12
13
////////////////////////////////////////////////////////////////////////////////
14
// nsISupports
15
16
NS_IMPL_ISUPPORTS_INHERITED(xpcAccessibleApplication,
17
                            xpcAccessibleGeneric,
18
                            nsIAccessibleApplication)
19
20
////////////////////////////////////////////////////////////////////////////////
21
// nsIAccessibleApplication
22
23
NS_IMETHODIMP
24
xpcAccessibleApplication::GetAppName(nsAString& aName)
25
0
{
26
0
  aName.Truncate();
27
0
28
0
  if (!Intl())
29
0
    return NS_ERROR_FAILURE;
30
0
31
0
  Intl()->AppName(aName);
32
0
  return NS_OK;
33
0
}
34
35
NS_IMETHODIMP
36
xpcAccessibleApplication::GetAppVersion(nsAString& aVersion)
37
0
{
38
0
  aVersion.Truncate();
39
0
40
0
  if (!Intl())
41
0
    return NS_ERROR_FAILURE;
42
0
43
0
  Intl()->AppVersion(aVersion);
44
0
  return NS_OK;
45
0
}
46
47
NS_IMETHODIMP
48
xpcAccessibleApplication::GetPlatformName(nsAString& aName)
49
0
{
50
0
  aName.Truncate();
51
0
52
0
  if (!Intl())
53
0
    return NS_ERROR_FAILURE;
54
0
55
0
  Intl()->PlatformName(aName);
56
0
  return NS_OK;
57
0
}
58
59
NS_IMETHODIMP
60
xpcAccessibleApplication::GetPlatformVersion(nsAString& aVersion)
61
0
{
62
0
  aVersion.Truncate();
63
0
64
0
  if (!Intl())
65
0
    return NS_ERROR_FAILURE;
66
0
67
0
  Intl()->PlatformVersion(aVersion);
68
0
  return NS_OK;
69
0
}