OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/common/view_messages.h" | 9 #include "content/common/view_messages.h" |
10 | 10 |
11 using webkit_glue::WebAccessibility; | 11 using webkit_glue::WebAccessibility; |
12 | 12 |
13 BrowserAccessibility* BrowserAccessibilityFactory::Create() { | 13 BrowserAccessibility* BrowserAccessibilityFactory::Create() { |
14 return BrowserAccessibility::Create(); | 14 return BrowserAccessibility::Create(); |
15 } | 15 } |
16 | 16 |
17 // Start child IDs at -1 and decrement each time, because clients use | 17 // Start child IDs at -1 and decrement each time, because clients use |
18 // child IDs of 1, 2, 3, ... to access the children of an object by | 18 // child IDs of 1, 2, 3, ... to access the children of an object by |
19 // index, so we use negative IDs to clearly distinguish between indices | 19 // index, so we use negative IDs to clearly distinguish between indices |
20 // and unique IDs. | 20 // and unique IDs. |
21 // static | 21 // static |
22 int32 BrowserAccessibilityManager::next_child_id_ = -1; | 22 int32 BrowserAccessibilityManager::next_child_id_ = -1; |
23 | 23 |
24 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 24 #if (defined(OS_POSIX) && !defined(OS_MACOSX)) || defined(USE_AURA) |
25 // There's no OS-specific implementation of BrowserAccessibilityManager | 25 // There's no OS-specific implementation of BrowserAccessibilityManager |
26 // on Unix, so just instantiate the base class. | 26 // on Unix, so just instantiate the base class. |
27 // static | 27 // static |
28 BrowserAccessibilityManager* BrowserAccessibilityManager::Create( | 28 BrowserAccessibilityManager* BrowserAccessibilityManager::Create( |
29 gfx::NativeView parent_view, | 29 gfx::NativeView parent_view, |
30 const WebAccessibility& src, | 30 const WebAccessibility& src, |
31 BrowserAccessibilityDelegate* delegate, | 31 BrowserAccessibilityDelegate* delegate, |
32 BrowserAccessibilityFactory* factory) { | 32 BrowserAccessibilityFactory* factory) { |
33 return new BrowserAccessibilityManager( | 33 return new BrowserAccessibilityManager( |
34 parent_view, src, delegate, factory); | 34 parent_view, src, delegate, factory); |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 // is so that we send a single OBJECT_SHOW event for the root of a subtree | 340 // is so that we send a single OBJECT_SHOW event for the root of a subtree |
341 // that just appeared for the first time, but not on any descendant of | 341 // that just appeared for the first time, but not on any descendant of |
342 // that subtree. | 342 // that subtree. |
343 if (send_show_events) | 343 if (send_show_events) |
344 NotifyAccessibilityEvent(ViewHostMsg_AccEvent::OBJECT_SHOW, instance); | 344 NotifyAccessibilityEvent(ViewHostMsg_AccEvent::OBJECT_SHOW, instance); |
345 | 345 |
346 instance->SendNodeUpdateEvents(); | 346 instance->SendNodeUpdateEvents(); |
347 | 347 |
348 return instance; | 348 return instance; |
349 } | 349 } |
OLD | NEW |