| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility_manager.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/browser/accessibility/browser_accessibility.h" | 8 #include "content/browser/accessibility/browser_accessibility.h" |
| 9 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 9 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
| 10 #include "content/common/accessibility_messages.h" | 10 #include "content/common/accessibility_messages.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 if (!node) { | 180 if (!node) { |
| 181 NOTREACHED(); | 181 NOTREACHED(); |
| 182 continue; | 182 continue; |
| 183 } | 183 } |
| 184 | 184 |
| 185 int notification_type = param.notification_type; | 185 int notification_type = param.notification_type; |
| 186 if (notification_type == AccessibilityNotificationFocusChanged || | 186 if (notification_type == AccessibilityNotificationFocusChanged || |
| 187 notification_type == AccessibilityNotificationBlur) { | 187 notification_type == AccessibilityNotificationBlur) { |
| 188 SetFocus(node, false); | 188 SetFocus(node, false); |
| 189 | 189 |
| 190 if (osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_HIDDEN) | 190 if (osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_HIDDEN && |
| 191 osk_state_ != OSK_DISALLOWED_BECAUSE_TAB_JUST_APPEARED) |
| 191 osk_state_ = OSK_ALLOWED; | 192 osk_state_ = OSK_ALLOWED; |
| 192 | 193 |
| 193 // Don't send a native focus event if the window itself doesn't | 194 // Don't send a native focus event if the window itself doesn't |
| 194 // have focus. | 195 // have focus. |
| 195 if (delegate_ && !delegate_->HasFocus()) | 196 if (delegate_ && !delegate_->HasFocus()) |
| 196 continue; | 197 continue; |
| 197 } | 198 } |
| 198 | 199 |
| 199 // Send the notification event to the operating system. | 200 // Send the notification event to the operating system. |
| 200 NotifyAccessibilityEvent(notification_type, node); | 201 NotifyAccessibilityEvent(notification_type, node); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 // is so that we send a single ObjectShow event for the root of a subtree | 399 // is so that we send a single ObjectShow event for the root of a subtree |
| 399 // that just appeared for the first time, but not on any descendant of | 400 // that just appeared for the first time, but not on any descendant of |
| 400 // that subtree. | 401 // that subtree. |
| 401 if (send_show_events) | 402 if (send_show_events) |
| 402 NotifyAccessibilityEvent(AccessibilityNotificationObjectShow, instance); | 403 NotifyAccessibilityEvent(AccessibilityNotificationObjectShow, instance); |
| 403 | 404 |
| 404 instance->PostInitialize(); | 405 instance->PostInitialize(); |
| 405 | 406 |
| 406 return instance; | 407 return instance; |
| 407 } | 408 } |
| OLD | NEW |