michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #if defined(ACCESSIBILITY) michael@0: michael@0: #include "UIAAccessibilityBridge.h" michael@0: #include "MetroUtils.h" michael@0: michael@0: #include michael@0: michael@0: #include "nsIAccessibleEvent.h" michael@0: #include "nsIAccessibleEditableText.h" michael@0: #include "nsIPersistentProperties2.h" michael@0: michael@0: // generated michael@0: #include "UIABridge.h" michael@0: michael@0: #include michael@0: michael@0: using namespace mozilla::a11y; michael@0: michael@0: namespace mozilla { michael@0: namespace widget { michael@0: namespace winrt { michael@0: michael@0: using namespace Microsoft::WRL; michael@0: michael@0: NS_IMPL_ISUPPORTS(AccessibilityBridge, nsIObserver) michael@0: michael@0: nsresult michael@0: AccessibilityBridge::Observe(nsISupports *aSubject, const char *aTopic, const char16_t *aData) michael@0: { michael@0: nsCOMPtr ev = do_QueryInterface(aSubject); michael@0: if (!ev) { michael@0: return NS_OK; michael@0: } michael@0: michael@0: uint32_t eventType = 0; michael@0: ev->GetEventType(&eventType); michael@0: if (eventType == nsIAccessibleEvent::EVENT_FOCUS) { michael@0: Microsoft::WRL::ComPtr bridgePtr; michael@0: mBridge.As(&bridgePtr); michael@0: if (bridgePtr) { michael@0: bridgePtr->FocusChangeEvent(); michael@0: } michael@0: } michael@0: michael@0: return NS_OK; michael@0: } michael@0: michael@0: } } } michael@0: michael@0: #endif // ACCESSIBILITY