| OLD | NEW |
| 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/accessibility/browser_accessibility_manager.h" | 5 #include "chrome/browser/accessibility/browser_accessibility_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" |
| 7 #include "chrome/browser/accessibility/browser_accessibility.h" | 8 #include "chrome/browser/accessibility/browser_accessibility.h" |
| 8 | 9 |
| 9 using webkit_glue::WebAccessibility; | 10 using webkit_glue::WebAccessibility; |
| 10 | 11 |
| 11 // Start child IDs at -1 and decrement each time, because clients use | 12 // Start child IDs at -1 and decrement each time, because clients use |
| 12 // child IDs of 1, 2, 3, ... to access the children of an object by | 13 // child IDs of 1, 2, 3, ... to access the children of an object by |
| 13 // index, so we use negative IDs to clearly distinguish between indices | 14 // index, so we use negative IDs to clearly distinguish between indices |
| 14 // and unique IDs. | 15 // and unique IDs. |
| 15 // static | 16 // static |
| 16 int32 BrowserAccessibilityManager::next_child_id_ = -1; | 17 int32 BrowserAccessibilityManager::next_child_id_ = -1; |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if ((src.state >> WebAccessibility::STATE_FOCUSED) & 1) | 327 if ((src.state >> WebAccessibility::STATE_FOCUSED) & 1) |
| 327 focus_ = instance; | 328 focus_ = instance; |
| 328 for (int i = 0; i < static_cast<int>(src.children.size()); ++i) { | 329 for (int i = 0; i < static_cast<int>(src.children.size()); ++i) { |
| 329 BrowserAccessibility* child = CreateAccessibilityTree( | 330 BrowserAccessibility* child = CreateAccessibilityTree( |
| 330 instance, GetNextChildID(), src.children[i], i); | 331 instance, GetNextChildID(), src.children[i], i); |
| 331 instance->AddChild(child); | 332 instance->AddChild(child); |
| 332 } | 333 } |
| 333 | 334 |
| 334 return instance; | 335 return instance; |
| 335 } | 336 } |
| OLD | NEW |