mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Implement accessibility enhancements (issue #1217)
- Add new CefBrowserHost::SetAccessibilityState method for toggling accessibility state when readers are detected by the client. - Add new CefAccessibilityHandler interface for the delivery of accessibility notifications to windowless (OSR) clients. - Fix delivery of CefFocusHandler callbacks to windowless clients. - cefclient: Add example windowless accessibility implementation on Windows and macOS. - cefclient: Automatically detect screen readers on Windows and macOS.
This commit is contained in:
committed by
Marshall Greenblatt
parent
64fcfa6068
commit
816f700d3e
@@ -11,11 +11,13 @@
|
||||
#include "include/wrapper/cef_closure_task.h"
|
||||
#include "include/wrapper/cef_helpers.h"
|
||||
#include "tests/cefclient/browser/client_handler_osr.h"
|
||||
#include "tests/cefclient/browser/osr_accessibility_node.h"
|
||||
#include "tests/cefclient/browser/osr_dragdrop_win.h"
|
||||
#include "tests/cefclient/browser/osr_renderer.h"
|
||||
|
||||
namespace client {
|
||||
|
||||
class OsrAccessibilityHelper;
|
||||
class OsrImeHandlerWin;
|
||||
|
||||
// Represents the native parent window for an off-screen browser. This object
|
||||
@@ -24,7 +26,7 @@ class OsrImeHandlerWin;
|
||||
class OsrWindowWin :
|
||||
public base::RefCountedThreadSafe<OsrWindowWin, CefDeleteOnUIThread>,
|
||||
public ClientHandlerOsr::OsrDelegate
|
||||
#if defined(CEF_USE_ATL)
|
||||
#if defined(CEF_USE_ATL)
|
||||
, public OsrDragEvents
|
||||
#endif
|
||||
{
|
||||
@@ -51,7 +53,7 @@ class OsrWindowWin :
|
||||
const CefBrowserSettings& settings,
|
||||
CefRefPtr<CefRequestContext> request_context,
|
||||
const std::string& startup_url);
|
||||
|
||||
|
||||
// Show the popup window with correct parent and bounds in parent coordinates.
|
||||
void ShowPopup(HWND parent_hwnd, int x, int y, size_t width, size_t height);
|
||||
|
||||
@@ -145,6 +147,8 @@ class OsrWindowWin :
|
||||
const CefRange& selection_range,
|
||||
const CefRenderHandler::RectList& character_bounds) OVERRIDE;
|
||||
|
||||
void UpdateAccessibilityTree(CefRefPtr<CefValue> value);
|
||||
|
||||
#if defined(CEF_USE_ATL)
|
||||
// OsrDragEvents methods.
|
||||
CefBrowserHost::DragOperationsMask OnDragEnter(
|
||||
@@ -178,6 +182,11 @@ class OsrWindowWin :
|
||||
#if defined(CEF_USE_ATL)
|
||||
CComPtr<DropTargetWin> drop_target_;
|
||||
CefRenderHandler::DragOperation current_drag_op_;
|
||||
|
||||
// Class that abstracts the accessibility information received from the
|
||||
// renderer.
|
||||
scoped_ptr<OsrAccessibilityHelper> accessibility_handler_;
|
||||
IAccessible* accessibility_root_;
|
||||
#endif
|
||||
|
||||
bool painting_popup_;
|
||||
|
Reference in New Issue
Block a user