Bug 1762911 - Remove InitializeStaticHeaders from expected leaks r=necko-reviewers...
[gecko.git] / accessible / atk / DocAccessibleWrap.cpp
blobf3dfba71acd23ae13c8d6c347c7d65a69bc30550
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
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "DocAccessibleWrap.h"
8 #include "mozilla/PresShell.h"
9 #include "nsIWidgetListener.h"
10 #include "nsTArray.h"
11 #include "nsWindow.h"
13 using namespace mozilla;
14 using namespace mozilla::a11y;
16 ////////////////////////////////////////////////////////////////////////////////
17 // DocAccessibleWrap
18 ////////////////////////////////////////////////////////////////////////////////
20 DocAccessibleWrap::DocAccessibleWrap(dom::Document* aDocument,
21 PresShell* aPresShell)
22 : DocAccessible(aDocument, aPresShell) {}
24 DocAccessibleWrap::~DocAccessibleWrap() {}
26 bool DocAccessibleWrap::IsActivated() {
27 if (nsWindow* window = nsWindow::GetFocusedWindow()) {
28 if (nsIWidgetListener* listener = window->GetWidgetListener()) {
29 if (PresShell* presShell = listener->GetPresShell()) {
30 return presShell == PresShellPtr();
35 return false;