Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(766)

Unified Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 1822823002: Implement Chrome OS accessibility features to highlight focus, caret & cursor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/chrome_views_delegate.cc
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc
index 4a5c719d9724ad6f629cc86652155422e004831e..e5ac9ec9858327ced2c9853192bc6c89fa6d9cad 100644
--- a/chrome/browser/ui/views/chrome_views_delegate.cc
+++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -17,6 +17,10 @@
#include "components/version_info/version_info.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
+#include "content/public/browser/focused_node_details.h"
+#include "content/public/browser/notification_details.h"
+#include "content/public/browser/notification_service.h"
+#include "content/public/browser/notification_types.h"
#include "grit/chrome_unscaled_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
@@ -253,6 +257,14 @@ bool ChromeViewsDelegate::GetSavedWindowPlacement(
void ChromeViewsDelegate::NotifyAccessibilityEvent(
views::View* view, ui::AXEvent event_type) {
#if defined(USE_AURA)
+ bool is_editable_node = false;
+ gfx::Rect bounds_in_screen = view->GetBoundsInScreen();
+ content::FocusedNodeDetails details = {is_editable_node, bounds_in_screen};
+ content::NotificationService::current()->Notify(
+ content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
+ content::Source<views::View>(view),
+ content::Details<content::FocusedNodeDetails>(&details));
+
AutomationManagerAura::GetInstance()->HandleEvent(
GetProfileForWindow(view->GetWidget()), view, event_type);
#endif

Powered by Google App Engine
This is Rietveld 408576698