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

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

Issue 10382051: Add initial GTK web accessibility framework (third attempt). (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_MACOSX) && \
25 // There's no OS-specific implementation of BrowserAccessibilityManager 25 !(defined(OS_WIN) && !defined(USE_AURA)) && \
26 // on Unix, so just instantiate the base class. 26 !defined(TOOLKIT_GTK)
27 // We have subclassess of BrowserAccessibilityManager on Mac, Linux/GTK,
28 // and non-Aura Win. For any other platform, instantiate the base class.
27 // static 29 // static
28 BrowserAccessibilityManager* BrowserAccessibilityManager::Create( 30 BrowserAccessibilityManager* BrowserAccessibilityManager::Create(
29 gfx::NativeView parent_view, 31 gfx::NativeView parent_view,
30 const WebAccessibility& src, 32 const WebAccessibility& src,
31 BrowserAccessibilityDelegate* delegate, 33 BrowserAccessibilityDelegate* delegate,
32 BrowserAccessibilityFactory* factory) { 34 BrowserAccessibilityFactory* factory) {
33 return new BrowserAccessibilityManager( 35 return new BrowserAccessibilityManager(
34 parent_view, src, delegate, factory); 36 parent_view, src, delegate, factory);
35 } 37 }
36 #endif 38 #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 367 // 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 368 // that just appeared for the first time, but not on any descendant of
367 // that subtree. 369 // that subtree.
368 if (send_show_events) 370 if (send_show_events)
369 NotifyAccessibilityEvent(AccessibilityNotificationObjectShow, instance); 371 NotifyAccessibilityEvent(AccessibilityNotificationObjectShow, instance);
370 372
371 instance->PostInitialize(); 373 instance->PostInitialize();
372 374
373 return instance; 375 return instance;
374 } 376 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698