OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/accessibility/browser_accessibility_manager.h" |
| 6 |
| 7 #include "chrome/common/render_messages_params.h" |
| 8 |
| 9 using webkit_glue::WebAccessibility; |
| 10 |
| 11 |
| 12 BrowserAccessibilityManager::BrowserAccessibilityManager( |
| 13 gfx::NativeWindow parent_window) |
| 14 : parent_window_(parent_window) { |
| 15 } |
| 16 |
| 17 BrowserAccessibilityManager::~BrowserAccessibilityManager() { |
| 18 } |
| 19 |
| 20 void BrowserAccessibilityManager::OnAccessibilityNotifications( |
| 21 const std::vector<ViewHostMsg_AccessibilityNotification_Params>& params) { |
| 22 for (uint32 index = 0; index < params.size(); index++) { |
| 23 const ViewHostMsg_AccessibilityNotification_Params& param = params[index]; |
| 24 |
| 25 switch (param.notification_type) { |
| 26 case ViewHostMsg_AccessibilityNotification_Params:: |
| 27 NOTIFICATION_TYPE_CHECK_STATE_CHANGED: |
| 28 OnAccessibilityObjectStateChange(param.acc_obj); |
| 29 break; |
| 30 case ViewHostMsg_AccessibilityNotification_Params:: |
| 31 NOTIFICATION_TYPE_CHILDREN_CHANGED: |
| 32 OnAccessibilityObjectChildrenChange(param.acc_obj); |
| 33 break; |
| 34 case ViewHostMsg_AccessibilityNotification_Params:: |
| 35 NOTIFICATION_TYPE_FOCUS_CHANGED: |
| 36 OnAccessibilityObjectFocusChange(param.acc_obj); |
| 37 break; |
| 38 case ViewHostMsg_AccessibilityNotification_Params:: |
| 39 NOTIFICATION_TYPE_LOAD_COMPLETE: |
| 40 OnAccessibilityObjectLoadComplete(param.acc_obj); |
| 41 break; |
| 42 case ViewHostMsg_AccessibilityNotification_Params:: |
| 43 NOTIFICATION_TYPE_VALUE_CHANGED: |
| 44 OnAccessibilityObjectValueChange(param.acc_obj); |
| 45 break; |
| 46 default: |
| 47 DCHECK(0); |
| 48 break; |
| 49 } |
| 50 } |
| 51 } |
| 52 |
| 53 gfx::NativeWindow BrowserAccessibilityManager::GetParentWindow() { |
| 54 return parent_window_; |
| 55 } |
OLD | NEW |