OLD | NEW |
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_view_obj_wrapper.h" | 5 #include "ui/views/accessibility/ax_view_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/accessibility/ax_view_state.h" | 9 #include "ui/accessibility/ax_view_state.h" |
10 #include "ui/events/event_utils.h" | 10 #include "ui/events/event_utils.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 int32 AXViewObjWrapper::GetID() { | 74 int32 AXViewObjWrapper::GetID() { |
75 return AXAuraObjCache::GetInstance()->GetID(view_); | 75 return AXAuraObjCache::GetInstance()->GetID(view_); |
76 } | 76 } |
77 | 77 |
78 void AXViewObjWrapper::DoDefault() { | 78 void AXViewObjWrapper::DoDefault() { |
79 gfx::Rect rect = view_->GetLocalBounds(); | 79 gfx::Rect rect = view_->GetLocalBounds(); |
80 gfx::Point center = rect.CenterPoint(); | 80 gfx::Point center = rect.CenterPoint(); |
81 view_->OnMousePressed(ui::MouseEvent( | 81 view_->OnMousePressed(ui::MouseEvent( |
82 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), | 82 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), |
83 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 83 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 84 ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
84 view_->OnMouseReleased(ui::MouseEvent( | 85 view_->OnMouseReleased(ui::MouseEvent( |
85 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), | 86 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), |
86 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); | 87 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON, |
| 88 ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE))); |
87 } | 89 } |
88 | 90 |
89 void AXViewObjWrapper::Focus() { | 91 void AXViewObjWrapper::Focus() { |
90 view_->RequestFocus(); | 92 view_->RequestFocus(); |
91 } | 93 } |
92 | 94 |
93 void AXViewObjWrapper::MakeVisible() { | 95 void AXViewObjWrapper::MakeVisible() { |
94 // TODO(dtseng): Implement. | 96 // TODO(dtseng): Implement. |
95 } | 97 } |
96 | 98 |
97 void AXViewObjWrapper::SetSelection(int32 start, int32 end) { | 99 void AXViewObjWrapper::SetSelection(int32 start, int32 end) { |
98 // TODO(dtseng): Implement. | 100 // TODO(dtseng): Implement. |
99 } | 101 } |
100 | 102 |
101 void AXViewObjWrapper::ShowContextMenu() { | 103 void AXViewObjWrapper::ShowContextMenu() { |
102 view_->ShowContextMenu(view_->bounds().CenterPoint(), | 104 view_->ShowContextMenu(view_->bounds().CenterPoint(), |
103 ui::MENU_SOURCE_KEYBOARD); | 105 ui::MENU_SOURCE_KEYBOARD); |
104 } | 106 } |
105 | 107 |
106 } // namespace views | 108 } // namespace views |
OLD | NEW |