Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 6b8ba2f

Browse files
GUIDs
1 parent 6101ef7 commit 6b8ba2f

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

shell/platform/windows/accessibility_alert.cc

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -157,27 +157,24 @@ IFACEMETHODIMP AccessibilityAlert::get_accDefaultAction(VARIANT var_id,
157157

158158
// End of IAccessible methods.
159159

160+
160161
//
161-
// Methods used by the ATL COM map.
162+
// IServiceProvider implementation.
162163
//
163164

164-
// static
165-
STDMETHODIMP AccessibilityAlert::InternalQueryInterface(
166-
void* this_ptr,
167-
const _ATL_INTMAP_ENTRY* entries,
168-
REFIID riid,
169-
void** object) {
170-
if (!object)
165+
IFACEMETHODIMP AccessibilityAlert::QueryService(REFGUID guidService,
166+
REFIID riid,
167+
void** object) {
168+
if (!object) {
171169
return E_INVALIDARG;
172-
*object = nullptr;
173-
AccessibilityAlert* accessible =
174-
reinterpret_cast<AccessibilityAlert*>(this_ptr);
175-
if (!accessible) {
176-
return E_FAIL;
177170
}
178171

179-
return CComObjectRootBase::InternalQueryInterface(this_ptr, entries, riid,
180-
object);
172+
if (guidService == IID_IAccessible) {
173+
return QueryInterface(riid, object);
174+
}
175+
176+
*object = nullptr;
177+
return E_FAIL;
181178
}
182179

183180
void AccessibilityAlert::SetText(const std::wstring& text) {

shell/platform/windows/accessibility_alert.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,15 @@ class AccessibilityRootNode;
2121
// the root AccessibilityRootNode node, and is therefore also a sibling
2222
// of the window's root node.
2323
// This node is not interactable to the user.
24-
class AccessibilityAlert : public CComObjectRootEx<CComMultiThreadModel>,
25-
public IDispatchImpl<IAccessible> {
24+
class __declspec(uuid("778c1bd8-383f-4d49-b6be-8937e12b6a32")) AccessibilityAlert : public CComObjectRootEx<CComMultiThreadModel>,
25+
public IDispatchImpl<IAccessible>,
26+
public IServiceProvider {
2627
public:
2728
BEGIN_COM_MAP(AccessibilityAlert)
29+
COM_INTERFACE_ENTRY(AccessibilityAlert)
2830
COM_INTERFACE_ENTRY(IAccessible)
31+
COM_INTERFACE_ENTRY(IDispatch)
32+
COM_INTERFACE_ENTRY(IServiceProvider)
2933
END_COM_MAP()
3034
//
3135
// IAccessible methods.
@@ -92,14 +96,12 @@ class AccessibilityAlert : public CComObjectRootEx<CComMultiThreadModel>,
9296
// End of IAccessible methods.
9397

9498
//
95-
// Methods used by the ATL COM map.
99+
// IServiceProvider method.
96100
//
97101

98-
// Called by BEGIN_COM_MAP() / END_COM_MAP().
99-
static STDMETHODIMP InternalQueryInterface(void* this_ptr,
100-
const _ATL_INTMAP_ENTRY* entries,
101-
REFIID riid,
102-
void** object);
102+
IFACEMETHODIMP QueryService(REFGUID guidService,
103+
REFIID riid,
104+
void** object) override;
103105

104106
AccessibilityAlert();
105107
~AccessibilityAlert() = default;

shell/platform/windows/accessibility_root_node.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
namespace flutter {
1717

1818
// A parent node that wraps the window IAccessible node.
19-
class __declspec(uuid("12344321-1234-4321-1234-aaaaaaaaaaaa")) AccessibilityRootNode : public CComObjectRootEx<CComMultiThreadModel>,
19+
class __declspec(uuid("fedb8280-ea4f-47a9-98fe-5d1a557fe4b3")) AccessibilityRootNode : public CComObjectRootEx<CComMultiThreadModel>,
2020
public IDispatchImpl<IAccessible>,
2121
public IServiceProvider {
2222
public:

0 commit comments

Comments
 (0)