summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/accessible_widget_helper_gtk.cc
diff options
context:
space:
mode:
authordmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 17:04:35 +0000
committerdmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-23 17:04:35 +0000
commit2b8002791e925dcdab88ebe1b74eb416f3b2d585 (patch)
tree3a7cdaad36988199d0499e12d7b561b31806ed87 /chrome/browser/gtk/accessible_widget_helper_gtk.cc
parentbf767417d66c4d54761dd619cfb93838bdc2353a (diff)
downloadchromium_src-2b8002791e925dcdab88ebe1b74eb416f3b2d585.zip
chromium_src-2b8002791e925dcdab88ebe1b74eb416f3b2d585.tar.gz
chromium_src-2b8002791e925dcdab88ebe1b74eb416f3b2d585.tar.bz2
Add support for more types of controls and events to GTK implementation of
accessibility extension API. Enable accessibility API for all subdialogs of the main Options dialog. BUG=none TEST=none Review URL: http://codereview.chromium.org/651037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/accessible_widget_helper_gtk.cc')
-rw-r--r--chrome/browser/gtk/accessible_widget_helper_gtk.cc21
1 files changed, 21 insertions, 0 deletions
diff --git a/chrome/browser/gtk/accessible_widget_helper_gtk.cc b/chrome/browser/gtk/accessible_widget_helper_gtk.cc
index 64710b1..e54c6ff 100644
--- a/chrome/browser/gtk/accessible_widget_helper_gtk.cc
+++ b/chrome/browser/gtk/accessible_widget_helper_gtk.cc
@@ -5,16 +5,27 @@
#include "chrome/browser/gtk/accessible_widget_helper_gtk.h"
#include "app/l10n_util.h"
+#include "chrome/browser/accessibility_events.h"
#include "chrome/browser/profile.h"
+#include "chrome/common/notification_service.h"
AccessibleWidgetHelper::AccessibleWidgetHelper(
GtkWidget* root_widget, Profile* profile)
: accessibility_event_router_(AccessibilityEventRouter::GetInstance()),
+ profile_(profile),
root_widget_(root_widget) {
accessibility_event_router_->AddRootWidget(root_widget_, profile);
}
AccessibleWidgetHelper::~AccessibleWidgetHelper() {
+ if (!window_title_.empty()) {
+ AccessibilityWindowInfo info(profile_, window_title_);
+ NotificationService::current()->Notify(
+ NotificationType::ACCESSIBILITY_WINDOW_CLOSED,
+ Source<Profile>(profile_),
+ Details<AccessibilityWindowInfo>(&info));
+ }
+
if (root_widget_)
accessibility_event_router_->RemoveRootWidget(root_widget_);
for (unsigned int i = 0; i < managed_widgets_.size(); i++) {
@@ -22,6 +33,16 @@ AccessibleWidgetHelper::~AccessibleWidgetHelper() {
}
}
+void AccessibleWidgetHelper::SendOpenWindowNotification(
+ const std::string& window_title) {
+ window_title_ = window_title;
+ AccessibilityWindowInfo info(profile_, window_title);
+ NotificationService::current()->Notify(
+ NotificationType::ACCESSIBILITY_WINDOW_OPENED,
+ Source<Profile>(profile_),
+ Details<AccessibilityWindowInfo>(&info));
+}
+
void AccessibleWidgetHelper::IgnoreWidget(GtkWidget* widget) {
accessibility_event_router_->IgnoreWidget(widget);
managed_widgets_.push_back(widget);