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

Side by Side Diff: ui/views/accessibility/ax_view_obj_wrapper.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, 1 month 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_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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 } 72 }
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(
82 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), 82 ui::MouseEvent(ui::ET_MOUSE_PRESSED, gfx::PointF(center),
83 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); 83 gfx::PointF(center), ui::EventTimeForNow(),
84 view_->OnMouseReleased(ui::MouseEvent( 84 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
85 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), 85 view_->OnMouseReleased(
86 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); 86 ui::MouseEvent(ui::ET_MOUSE_RELEASED, gfx::PointF(center),
87 gfx::PointF(center), ui::EventTimeForNow(),
88 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
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
OLDNEW
« no previous file with comments | « ui/message_center/views/notifier_settings_view.cc ('k') | ui/views/accessibility/native_view_accessibility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698