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

Side by Side Diff: ui/views/accessibility/ax_widget_obj_wrapper.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/views/accessibility/ax_widget_obj_wrapper.h" 5 #include "ui/views/accessibility/ax_widget_obj_wrapper.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/views/accessibility/ax_aura_obj_cache.h" 9 #include "ui/views/accessibility/ax_aura_obj_cache.h"
10 #include "ui/views/accessibility/ax_aura_obj_wrapper.h" 10 #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
(...skipping 28 matching lines...) Expand all
39 AXAuraObjCache::GetInstance()->GetOrCreate(widget_->GetRootView())); 39 AXAuraObjCache::GetInstance()->GetOrCreate(widget_->GetRootView()));
40 } 40 }
41 41
42 void AXWidgetObjWrapper::Serialize(ui::AXNodeData* out_node_data) { 42 void AXWidgetObjWrapper::Serialize(ui::AXNodeData* out_node_data) {
43 out_node_data->id = GetID(); 43 out_node_data->id = GetID();
44 out_node_data->role = widget_->widget_delegate()->GetAccessibleWindowRole(); 44 out_node_data->role = widget_->widget_delegate()->GetAccessibleWindowRole();
45 out_node_data->AddStringAttribute( 45 out_node_data->AddStringAttribute(
46 ui::AX_ATTR_NAME, 46 ui::AX_ATTR_NAME,
47 base::UTF16ToUTF8( 47 base::UTF16ToUTF8(
48 widget_->widget_delegate()->GetAccessibleWindowTitle())); 48 widget_->widget_delegate()->GetAccessibleWindowTitle()));
49 out_node_data->location = widget_->GetWindowBoundsInScreen(); 49 out_node_data->location = gfx::RectF(widget_->GetWindowBoundsInScreen());
50 out_node_data->state = 0; 50 out_node_data->state = 0;
51 } 51 }
52 52
53 int32_t AXWidgetObjWrapper::GetID() { 53 int32_t AXWidgetObjWrapper::GetID() {
54 return AXAuraObjCache::GetInstance()->GetID(widget_); 54 return AXAuraObjCache::GetInstance()->GetID(widget_);
55 } 55 }
56 56
57 void AXWidgetObjWrapper::OnWidgetDestroying(Widget* widget) { 57 void AXWidgetObjWrapper::OnWidgetDestroying(Widget* widget) {
58 AXAuraObjCache::GetInstance()->Remove(widget); 58 AXAuraObjCache::GetInstance()->Remove(widget);
59 } 59 }
60 60
61 void AXWidgetObjWrapper::OnWillRemoveView(Widget* widget, View* view) { 61 void AXWidgetObjWrapper::OnWillRemoveView(Widget* widget, View* view) {
62 AXAuraObjCache::GetInstance()->RemoveViewSubtree(view); 62 AXAuraObjCache::GetInstance()->RemoveViewSubtree(view);
63 } 63 }
64 64
65 } // namespace views 65 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/accessibility/ax_view_obj_wrapper.cc ('k') | ui/views/accessibility/ax_window_obj_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698