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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_base.cc

Issue 420653003: MacViews: Accessibility bridge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build Created 6 years, 4 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
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/accessibility/platform/ax_platform_node_base.h"
6
7 #include "ui/accessibility/ax_node_data.h"
8 #include "ui/accessibility/platform/ax_platform_node_delegate.h"
9
10 namespace ui {
11
12 AXPlatformNodeBase::AXPlatformNodeBase() {
13 }
14
15 AXPlatformNodeBase::~AXPlatformNodeBase() {
16 }
17
18 void AXPlatformNodeBase::Init(AXPlatformNodeDelegate* delegate) {
19 delegate_ = delegate;
20 }
21
22 AXRole AXPlatformNodeBase::GetRole() const {
23 return delegate_ ? delegate_->GetData()->role : AX_ROLE_UNKNOWN;
24 }
25
26 gfx::Rect AXPlatformNodeBase::GetBoundsInScreen() const {
27 if (!delegate_)
28 return gfx::Rect();
29 gfx::Rect bounds = delegate_->GetData()->location;
30 bounds.Offset(delegate_->GetGlobalCoordinateOffset());
31 return bounds;
32 }
33
34 gfx::NativeViewAccessible AXPlatformNodeBase::GetParent() {
35 return delegate_ ? delegate_->GetParent() : NULL;
36 }
37
38 int AXPlatformNodeBase::GetChildCount() {
39 return delegate_ ? delegate_->GetChildCount() : 0;
40 }
41
42 gfx::NativeViewAccessible AXPlatformNodeBase::ChildAtIndex(int index) {
43 return delegate_ ? delegate_->ChildAtIndex(index) : NULL;
44 }
45
46 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698