| Index: chrome/browser/ui/views/accessibility_event_router_views.cc
|
| ===================================================================
|
| --- chrome/browser/ui/views/accessibility_event_router_views.cc (revision 91880)
|
| +++ chrome/browser/ui/views/accessibility_event_router_views.cc (working copy)
|
| @@ -13,7 +13,7 @@
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
|
| -#include "content/common/notification_type.h"
|
| +#include "chrome/common/chrome_notification_types.h"
|
| #include "ui/base/models/combobox_model.h"
|
| #include "ui/base/accessibility/accessible_view_state.h"
|
| #include "views/controls/button/checkbox.h"
|
| @@ -53,26 +53,26 @@
|
| switch (event_type) {
|
| case ui::AccessibilityTypes::EVENT_FOCUS:
|
| DispatchAccessibilityNotification(
|
| - view, NotificationType::ACCESSIBILITY_CONTROL_FOCUSED);
|
| + view, chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED);
|
| break;
|
| case ui::AccessibilityTypes::EVENT_MENUSTART:
|
| case ui::AccessibilityTypes::EVENT_MENUPOPUPSTART:
|
| DispatchAccessibilityNotification(
|
| - view, NotificationType::ACCESSIBILITY_MENU_OPENED);
|
| + view, chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED);
|
| break;
|
| case ui::AccessibilityTypes::EVENT_MENUEND:
|
| case ui::AccessibilityTypes::EVENT_MENUPOPUPEND:
|
| DispatchAccessibilityNotification(
|
| - view, NotificationType::ACCESSIBILITY_MENU_CLOSED);
|
| + view, chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED);
|
| break;
|
| case ui::AccessibilityTypes::EVENT_TEXT_CHANGED:
|
| case ui::AccessibilityTypes::EVENT_SELECTION_CHANGED:
|
| DispatchAccessibilityNotification(
|
| - view, NotificationType::ACCESSIBILITY_TEXT_CHANGED);
|
| + view, chrome::NOTIFICATION_ACCESSIBILITY_TEXT_CHANGED);
|
| break;
|
| case ui::AccessibilityTypes::EVENT_VALUE_CHANGED:
|
| DispatchAccessibilityNotification(
|
| - view, NotificationType::ACCESSIBILITY_CONTROL_ACTION);
|
| + view, chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_ACTION);
|
| break;
|
| case ui::AccessibilityTypes::EVENT_ALERT:
|
| case ui::AccessibilityTypes::EVENT_NAME_CHANGED:
|
| @@ -105,7 +105,7 @@
|
| item_index,
|
| item_count);
|
| SendAccessibilityNotification(
|
| - NotificationType::ACCESSIBILITY_CONTROL_FOCUSED, &info);
|
| + chrome::NOTIFICATION_ACCESSIBILITY_CONTROL_FOCUSED, &info);
|
| }
|
|
|
| //
|
| @@ -119,7 +119,7 @@
|
| }
|
|
|
| void AccessibilityEventRouterViews::DispatchAccessibilityNotification(
|
| - views::View* view, NotificationType type) {
|
| + views::View* view, int type) {
|
| // Get the profile associated with this view. If it's not found, use
|
| // the most recent profile where accessibility events were sent, or
|
| // the default profile.
|
| @@ -144,8 +144,8 @@
|
| if (class_name == views::Checkbox::kViewClassName) {
|
| SendCheckboxNotification(view, type, profile);
|
| } else if (class_name == views::MenuButton::kViewClassName ||
|
| - type == NotificationType::ACCESSIBILITY_MENU_OPENED ||
|
| - type == NotificationType::ACCESSIBILITY_MENU_CLOSED) {
|
| + type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED ||
|
| + type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED) {
|
| SendMenuNotification(view, type, profile);
|
| } else if (IsMenuEvent(view, type)) {
|
| SendMenuItemNotification(view, type, profile);
|
| @@ -166,25 +166,25 @@
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendButtonNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| AccessibilityButtonInfo info(profile, GetViewName(view));
|
| SendAccessibilityNotification(type, &info);
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendLinkNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| AccessibilityLinkInfo info(profile, GetViewName(view));
|
| SendAccessibilityNotification(type, &info);
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendMenuNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| AccessibilityMenuInfo info(profile, GetViewName(view));
|
| SendAccessibilityNotification(type, &info);
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendMenuItemNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| std::string name = GetViewName(view);
|
|
|
| bool has_submenu = false;
|
| @@ -228,9 +228,9 @@
|
| }
|
|
|
| bool AccessibilityEventRouterViews::IsMenuEvent(
|
| - views::View* view, NotificationType type) {
|
| - if (type == NotificationType::ACCESSIBILITY_MENU_OPENED ||
|
| - type == NotificationType::ACCESSIBILITY_MENU_CLOSED)
|
| + views::View* view, int type) {
|
| + if (type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_OPENED ||
|
| + type == chrome::NOTIFICATION_ACCESSIBILITY_MENU_CLOSED)
|
| return true;
|
|
|
| while (view) {
|
| @@ -248,7 +248,7 @@
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendLocationBarNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| ui::AccessibleViewState state;
|
| view->GetAccessibleState(&state);
|
| std::string name = UTF16ToUTF8(state.name);
|
| @@ -259,7 +259,7 @@
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendTextfieldNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| ui::AccessibleViewState state;
|
| view->GetAccessibleState(&state);
|
| std::string name = UTF16ToUTF8(state.name);
|
| @@ -272,7 +272,7 @@
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendComboboxNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| ui::AccessibleViewState state;
|
| view->GetAccessibleState(&state);
|
| std::string name = UTF16ToUTF8(state.name);
|
| @@ -283,7 +283,7 @@
|
| }
|
|
|
| void AccessibilityEventRouterViews::SendCheckboxNotification(
|
| - views::View* view, NotificationType type, Profile* profile) {
|
| + views::View* view, int type, Profile* profile) {
|
| ui::AccessibleViewState state;
|
| view->GetAccessibleState(&state);
|
| std::string name = UTF16ToUTF8(state.name);
|
|
|