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

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

Issue 2154213007: Replace gfx::Rect with gfx::RectF in ui::AXNodeData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix win compile Created 4 years, 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 "ui/accessibility/platform/ax_platform_node_base.h" 5 #include "ui/accessibility/platform/ax_platform_node_base.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/accessibility/ax_node_data.h" 8 #include "ui/accessibility/ax_node_data.h"
9 #include "ui/accessibility/platform/ax_platform_node_delegate.h" 9 #include "ui/accessibility/platform/ax_platform_node_delegate.h"
10 #include "ui/gfx/geometry/rect_conversions.h"
10 11
11 namespace ui { 12 namespace ui {
12 13
13 void AXPlatformNodeBase::Init(AXPlatformNodeDelegate* delegate) { 14 void AXPlatformNodeBase::Init(AXPlatformNodeDelegate* delegate) {
14 delegate_ = delegate; 15 delegate_ = delegate;
15 } 16 }
16 17
17 const AXNodeData& AXPlatformNodeBase::GetData() const { 18 const AXNodeData& AXPlatformNodeBase::GetData() const {
18 CHECK(delegate_); 19 CHECK(delegate_);
19 return delegate_->GetData(); 20 return delegate_->GetData();
20 } 21 }
21 22
22 gfx::Rect AXPlatformNodeBase::GetBoundsInScreen() const { 23 gfx::Rect AXPlatformNodeBase::GetBoundsInScreen() const {
23 CHECK(delegate_); 24 CHECK(delegate_);
24 gfx::Rect bounds = GetData().location; 25 gfx::Rect bounds = gfx::ToEnclosingRect(GetData().location);
25 bounds.Offset(delegate_->GetGlobalCoordinateOffset()); 26 bounds.Offset(delegate_->GetGlobalCoordinateOffset());
26 return bounds; 27 return bounds;
27 } 28 }
28 29
29 gfx::NativeViewAccessible AXPlatformNodeBase::GetParent() { 30 gfx::NativeViewAccessible AXPlatformNodeBase::GetParent() {
30 CHECK(delegate_); 31 CHECK(delegate_);
31 return delegate_->GetParent(); 32 return delegate_->GetParent();
32 } 33 }
33 34
34 int AXPlatformNodeBase::GetChildCount() { 35 int AXPlatformNodeBase::GetChildCount() {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 198 }
198 199
199 // static 200 // static
200 AXPlatformNodeBase* AXPlatformNodeBase::FromNativeViewAccessible( 201 AXPlatformNodeBase* AXPlatformNodeBase::FromNativeViewAccessible(
201 gfx::NativeViewAccessible accessible) { 202 gfx::NativeViewAccessible accessible) {
202 return static_cast<AXPlatformNodeBase*>( 203 return static_cast<AXPlatformNodeBase*>(
203 AXPlatformNode::FromNativeViewAccessible(accessible)); 204 AXPlatformNode::FromNativeViewAccessible(accessible));
204 } 205 }
205 206
206 } // namespace ui 207 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_auralinux.cc ('k') | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698