-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IA2 dump tree implementation #75
Conversation
2c9b723
to
f5adbb0
Compare
f5adbb0
to
15d3751
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall - loads of comments/questions but nothing bad :)
// We will need these for windows related things, see the formatter_win.cc in | ||
// chromium | ||
// #include <oleacc.h> | ||
// #include <wrl/client.h> | ||
|
||
// TODO: we will probably need to get these from the IAccessible2 git repo, like | ||
// in Chromium | ||
// #include "third_party/iaccessible2/ia2_api_all.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again maybe not in this PR, but it might be nice to have a similar third_party
convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, it seems weird to just have these generated files here. made an issue: #96
HWND hCurWnd = nullptr; | ||
// TODO: This is not the right API -- probably we should copy chrome code | ||
// and find a hwnd by titla alone. Right now this only returns a Google Chrome | ||
// HWND. But if I don't include PID, then I get other processess with google |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to filter on name here at all? Do we get multiple processes from the same ProcessID?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We get multiple windows for a single process id. And when I got all the windows (not scoped to a single process id) some of them also had "Google Chrome" in the in the name, I think it was the Google Chrome installer. But this will be handled in a follow up PR I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Totally fine, was just trying to understand what the underlying issue even is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me with comments (including Alice's comments) addressed. I'm happy to see this working!
|
||
Microsoft::WRL::ComPtr<IServiceProvider> service_provider; | ||
HRESULT hr = root_->QueryInterface(IID_PPV_ARGS(&service_provider)); | ||
hr = service_provider->QueryService(IID_IAccessible, IID_PPV_ARGS(&ia2)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps it should be moved to an utility method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree this should be done, but I was thinking we'd do it in a follow up with #94 94 -- I added TODO note here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looks good! Land when you're ready.
In this PR:
ia2_api_all.h
andia2_api_all_i.cc
that was created by running concat.sh in LinuxA11y/IAccessible2 then MIDLbuild/bin/Release/dump_tree_ia2.exe
Follow up tasks:
CoInitialize(nullptr);
, because you have to callCoUninitialize()
when there are no longer any interface pointers on the stack (otherwise you get a seg fault). you can call multiple times -- as long as its the same amount of times. possibly we can to call every time we create or destroy a "IA2Node" ?