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

Side by Side Diff: ui/views/accessibility/native_view_accessibility.cc

Issue 1421713002: Explicitly convert Point to PointF for event code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wip
Patch Set: pointfconvert-prod: . Created 5 years, 2 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/native_view_accessibility.h" 5 #include "ui/views/accessibility/native_view_accessibility.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "ui/accessibility/ax_view_state.h" 8 #include "ui/accessibility/ax_view_state.h"
9 #include "ui/events/event_utils.h" 9 #include "ui/events/event_utils.h"
10 #include "ui/views/controls/native/native_view_host.h" 10 #include "ui/views/controls/native/native_view_host.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 focus_manager ? focus_manager->GetFocusedView() : nullptr; 169 focus_manager ? focus_manager->GetFocusedView() : nullptr;
170 return focused_view ? focused_view->GetNativeViewAccessible() : nullptr; 170 return focused_view ? focused_view->GetNativeViewAccessible() : nullptr;
171 } 171 }
172 172
173 gfx::AcceleratedWidget 173 gfx::AcceleratedWidget
174 NativeViewAccessibility::GetTargetForNativeAccessibilityEvent() { 174 NativeViewAccessibility::GetTargetForNativeAccessibilityEvent() {
175 return gfx::kNullAcceleratedWidget; 175 return gfx::kNullAcceleratedWidget;
176 } 176 }
177 177
178 void NativeViewAccessibility::DoDefaultAction() { 178 void NativeViewAccessibility::DoDefaultAction() {
179 gfx::Point center = view_->GetLocalBounds().CenterPoint(); 179 gfx::PointF center(view_->GetLocalBounds().CenterPoint());
180 view_->OnMousePressed(ui::MouseEvent(ui::ET_MOUSE_PRESSED, 180 view_->OnMousePressed(ui::MouseEvent(ui::ET_MOUSE_PRESSED,
181 center, 181 center,
182 center, 182 center,
183 ui::EventTimeForNow(), 183 ui::EventTimeForNow(),
184 ui::EF_LEFT_MOUSE_BUTTON, 184 ui::EF_LEFT_MOUSE_BUTTON,
185 ui::EF_LEFT_MOUSE_BUTTON)); 185 ui::EF_LEFT_MOUSE_BUTTON));
186 view_->OnMouseReleased(ui::MouseEvent(ui::ET_MOUSE_RELEASED, 186 view_->OnMouseReleased(ui::MouseEvent(ui::ET_MOUSE_RELEASED,
187 center, 187 center,
188 center, 188 center,
189 ui::EventTimeForNow(), 189 ui::EventTimeForNow(),
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 child_widget_platform_node->GetDelegate()); 245 child_widget_platform_node->GetDelegate());
246 if (child_widget_view_accessibility->parent_widget() != widget) 246 if (child_widget_view_accessibility->parent_widget() != widget)
247 child_widget_view_accessibility->SetParentWidget(widget); 247 child_widget_view_accessibility->SetParentWidget(widget);
248 } 248 }
249 249
250 result_child_widgets->push_back(child_widget); 250 result_child_widgets->push_back(child_widget);
251 } 251 }
252 } 252 }
253 253
254 } // namespace views 254 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698