summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/import_dialog_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/import_dialog_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/import_dialog_gtk.cc')
-rw-r--r--chrome/browser/gtk/import_dialog_gtk.cc17
1 files changed, 15 insertions, 2 deletions
diff --git a/chrome/browser/gtk/import_dialog_gtk.cc b/chrome/browser/gtk/import_dialog_gtk.cc
index 71546b2..fb3d92d 100644
--- a/chrome/browser/gtk/import_dialog_gtk.cc
+++ b/chrome/browser/gtk/import_dialog_gtk.cc
@@ -1,11 +1,14 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/gtk/import_dialog_gtk.h"
+#include <string>
+
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
+#include "chrome/browser/gtk/accessible_widget_helper_gtk.h"
#include "chrome/common/gtk_util.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
@@ -34,13 +37,20 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile,
importer_host_(new ImporterHost()),
initial_state_(initial_state) {
// Build the dialog.
+ std::string dialog_name = l10n_util::GetStringUTF8(
+ IDS_IMPORT_SETTINGS_TITLE);
dialog_ = gtk_dialog_new_with_buttons(
- l10n_util::GetStringUTF8(IDS_IMPORT_SETTINGS_TITLE).c_str(),
+ dialog_name.c_str(),
parent,
(GtkDialogFlags) (GTK_DIALOG_MODAL | GTK_DIALOG_NO_SEPARATOR),
GTK_STOCK_CANCEL,
GTK_RESPONSE_REJECT,
NULL);
+
+ accessible_widget_helper_.reset(new AccessibleWidgetHelper(
+ dialog_, profile));
+ accessible_widget_helper_->SendOpenWindowNotification(dialog_name);
+
gtk_widget_realize(dialog_);
gtk_util::SetWindowSizeFromResources(GTK_WINDOW(dialog_),
IDS_IMPORT_DIALOG_WIDTH_CHARS,
@@ -128,6 +138,9 @@ ImportDialogGtk::ImportDialogGtk(GtkWindow* parent, Profile* profile,
gtk_widget_show_all(dialog_);
}
+ImportDialogGtk::~ImportDialogGtk() {
+}
+
void ImportDialogGtk::OnDialogResponse(GtkWidget* widget, int response) {
gtk_widget_hide_all(dialog_);
if (response == GTK_RESPONSE_ACCEPT) {