Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1411)

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.cc

Issue 9839069: Add initial GTK web accessibility framework. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/common/accessibility_messages.h" 9 #include "content/common/accessibility_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)) || defined(USE_AURA) 24 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOOLKIT_GTK)
25 // There's no OS-specific implementation of BrowserAccessibilityManager 25 // We have implementations of BrowserAccessibilityManager on Win, Mac,
26 // on Unix, so just instantiate the base class. 26 // and GTK. If we have anything else, 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);
35 } 35 }
36 #endif 36 #endif
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 // is so that we send a single ObjectShow event for the root of a subtree 365 // is so that we send a single ObjectShow event for the root of a subtree
366 // that just appeared for the first time, but not on any descendant of 366 // that just appeared for the first time, but not on any descendant of
367 // that subtree. 367 // that subtree.
368 if (send_show_events) 368 if (send_show_events)
369 NotifyAccessibilityEvent(AccessibilityNotificationObjectShow, instance); 369 NotifyAccessibilityEvent(AccessibilityNotificationObjectShow, instance);
370 370
371 instance->PostInitialize(); 371 instance->PostInitialize();
372 372
373 return instance; 373 return instance;
374 } 374 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698