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

Side by Side Diff: chrome/browser/gtk/accessible_widget_helper_gtk.cc

Issue 1585011: Add menu and menu item events to the accessibility extension api, and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h" 5 #include "chrome/browser/gtk/accessible_widget_helper_gtk.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "chrome/browser/accessibility_events.h" 8 #include "chrome/browser/accessibility_events.h"
9 #include "chrome/browser/profile.h" 9 #include "chrome/browser/profile.h"
10 #include "chrome/common/notification_service.h" 10 #include "chrome/common/notification_service.h"
11 11
12 AccessibleWidgetHelper::AccessibleWidgetHelper( 12 AccessibleWidgetHelper::AccessibleWidgetHelper(
13 GtkWidget* root_widget, Profile* profile) 13 GtkWidget* root_widget, Profile* profile)
14 : accessibility_event_router_(AccessibilityEventRouter::GetInstance()), 14 : accessibility_event_router_(AccessibilityEventRouterGtk::GetInstance()),
15 profile_(profile), 15 profile_(profile),
16 root_widget_(root_widget) { 16 root_widget_(root_widget) {
17 accessibility_event_router_->AddRootWidget(root_widget_, profile); 17 accessibility_event_router_->AddRootWidget(root_widget_, profile);
18 } 18 }
19 19
20 AccessibleWidgetHelper::~AccessibleWidgetHelper() { 20 AccessibleWidgetHelper::~AccessibleWidgetHelper() {
21 if (!window_title_.empty()) { 21 if (!window_title_.empty()) {
22 AccessibilityWindowInfo info(profile_, window_title_); 22 AccessibilityWindowInfo info(profile_, window_title_);
23 NotificationService::current()->Notify( 23 NotificationService::current()->Notify(
24 NotificationType::ACCESSIBILITY_WINDOW_CLOSED, 24 NotificationType::ACCESSIBILITY_WINDOW_CLOSED,
(...skipping 28 matching lines...) Expand all
53 accessibility_event_router_->SetWidgetName(widget, name); 53 accessibility_event_router_->SetWidgetName(widget, name);
54 managed_widgets_.push_back(widget); 54 managed_widgets_.push_back(widget);
55 } 55 }
56 56
57 void AccessibleWidgetHelper::SetWidgetName( 57 void AccessibleWidgetHelper::SetWidgetName(
58 GtkWidget* widget, int string_id) { 58 GtkWidget* widget, int string_id) {
59 std::string name = l10n_util::GetStringUTF8(string_id); 59 std::string name = l10n_util::GetStringUTF8(string_id);
60 accessibility_event_router_->SetWidgetName(widget, name); 60 accessibility_event_router_->SetWidgetName(widget, name);
61 managed_widgets_.push_back(widget); 61 managed_widgets_.push_back(widget);
62 } 62 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/accessible_widget_helper_gtk.h ('k') | chrome/browser/views/frame/browser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698