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

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

Issue 1543173002: Switch to standard integer types in ui/views/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 if (view_data.selection_start > -1 && view_data.selection_end > -1) { 67 if (view_data.selection_start > -1 && view_data.selection_end > -1) {
68 out_node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START, 68 out_node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_START,
69 view_data.selection_start); 69 view_data.selection_start);
70 70
71 out_node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END, 71 out_node_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END,
72 view_data.selection_end); 72 view_data.selection_end);
73 } 73 }
74 } 74 }
75 75
76 int32 AXViewObjWrapper::GetID() { 76 int32_t AXViewObjWrapper::GetID() {
77 return AXAuraObjCache::GetInstance()->GetID(view_); 77 return AXAuraObjCache::GetInstance()->GetID(view_);
78 } 78 }
79 79
80 void AXViewObjWrapper::DoDefault() { 80 void AXViewObjWrapper::DoDefault() {
81 gfx::Rect rect = view_->GetLocalBounds(); 81 gfx::Rect rect = view_->GetLocalBounds();
82 gfx::Point center = rect.CenterPoint(); 82 gfx::Point center = rect.CenterPoint();
83 view_->OnMousePressed(ui::MouseEvent( 83 view_->OnMousePressed(ui::MouseEvent(
84 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(), 84 ui::ET_MOUSE_PRESSED, center, center, ui::EventTimeForNow(),
85 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); 85 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
86 view_->OnMouseReleased(ui::MouseEvent( 86 view_->OnMouseReleased(ui::MouseEvent(
87 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(), 87 ui::ET_MOUSE_RELEASED, center, center, ui::EventTimeForNow(),
88 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON)); 88 ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON));
89 } 89 }
90 90
91 void AXViewObjWrapper::Focus() { 91 void AXViewObjWrapper::Focus() {
92 view_->RequestFocus(); 92 view_->RequestFocus();
93 } 93 }
94 94
95 void AXViewObjWrapper::MakeVisible() { 95 void AXViewObjWrapper::MakeVisible() {
96 // TODO(dtseng): Implement. 96 // TODO(dtseng): Implement.
97 } 97 }
98 98
99 void AXViewObjWrapper::SetSelection(int32 start, int32 end) { 99 void AXViewObjWrapper::SetSelection(int32_t start, int32_t end) {
100 // TODO(dtseng): Implement. 100 // TODO(dtseng): Implement.
101 } 101 }
102 102
103 void AXViewObjWrapper::ShowContextMenu() { 103 void AXViewObjWrapper::ShowContextMenu() {
104 view_->ShowContextMenu(view_->bounds().CenterPoint(), 104 view_->ShowContextMenu(view_->bounds().CenterPoint(),
105 ui::MENU_SOURCE_KEYBOARD); 105 ui::MENU_SOURCE_KEYBOARD);
106 } 106 }
107 107
108 } // namespace views 108 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698