Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/accessible/xpcom/xpcAccessibleTableCell.h
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
#ifndef mozilla_a11y_xpcom_xpcAccessibletableCell_h_
8
#define mozilla_a11y_xpcom_xpcAccessibletableCell_h_
9
10
#include "nsIAccessibleTable.h"
11
12
#include "xpcAccessibleHyperText.h"
13
14
namespace mozilla {
15
namespace a11y {
16
17
/**
18
 * XPCOM wrapper around TableAccessibleCell class.
19
 */
20
class xpcAccessibleTableCell : public xpcAccessibleHyperText,
21
                               public nsIAccessibleTableCell
22
{
23
public:
24
  explicit xpcAccessibleTableCell(Accessible* aIntl) :
25
0
    xpcAccessibleHyperText(aIntl) { }
26
27
  xpcAccessibleTableCell(ProxyAccessible* aProxy, uint32_t aInterfaces) :
28
0
    xpcAccessibleHyperText(aProxy, aInterfaces) {}
29
30
  NS_DECL_ISUPPORTS_INHERITED
31
32
  // nsIAccessibleTableCell
33
  NS_IMETHOD GetTable(nsIAccessibleTable** aTable) final;
34
  NS_IMETHOD GetColumnIndex(int32_t* aColIdx) final;
35
  NS_IMETHOD GetRowIndex(int32_t* aRowIdx) final;
36
  NS_IMETHOD GetColumnExtent(int32_t* aExtent) final;
37
  NS_IMETHOD GetRowExtent(int32_t* aExtent) final;
38
  NS_IMETHOD GetColumnHeaderCells(nsIArray** aHeaderCells) final;
39
  NS_IMETHOD GetRowHeaderCells(nsIArray** aHeaderCells) final;
40
  NS_IMETHOD IsSelected(bool* aSelected) final;
41
42
protected:
43
0
  virtual ~xpcAccessibleTableCell() {}
44
45
private:
46
  TableCellAccessible* Intl()
47
0
  {
48
0
    if (Accessible* acc = mIntl.AsAccessible()) {
49
0
      return acc->AsTableCell();
50
0
    }
51
0
52
0
    return nullptr;
53
0
}
54
55
  xpcAccessibleTableCell(const xpcAccessibleTableCell&) = delete;
56
  xpcAccessibleTableCell& operator =(const xpcAccessibleTableCell&) = delete;
57
};
58
59
} // namespace a11y
60
} // namespace mozilla
61
62
#endif // mozilla_a11y_xpcom_xpcAccessibletableCell_h_