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

Side by Side Diff: chrome/browser/ui/views/autofill/tooltip_icon.cc

Issue 2477463003: Replace ui::AXViewState with AXNodeData and AXActionData (Closed)
Patch Set: Fix test Created 4 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "chrome/browser/ui/views/autofill/tooltip_icon.h" 5 #include "chrome/browser/ui/views/autofill/tooltip_icon.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "chrome/browser/ui/views/autofill/info_bubble.h" 9 #include "chrome/browser/ui/views/autofill/info_bubble.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_node_data.h"
11 #include "ui/gfx/paint_vector_icon.h" 11 #include "ui/gfx/paint_vector_icon.h"
12 #include "ui/gfx/vector_icons_public.h" 12 #include "ui/gfx/vector_icons_public.h"
13 #include "ui/views/bubble/bubble_frame_view.h" 13 #include "ui/views/bubble/bubble_frame_view.h"
14 #include "ui/views/mouse_watcher_view_host.h" 14 #include "ui/views/mouse_watcher_view_host.h"
15 #include "ui/views/painter.h" 15 #include "ui/views/painter.h"
16 16
17 namespace autofill { 17 namespace autofill {
18 18
19 namespace { 19 namespace {
20 20
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 show_timer_.Stop(); 80 show_timer_.Stop();
81 } 81 }
82 82
83 void TooltipIcon::OnGestureEvent(ui::GestureEvent* event) { 83 void TooltipIcon::OnGestureEvent(ui::GestureEvent* event) {
84 if (event->type() == ui::ET_GESTURE_TAP) { 84 if (event->type() == ui::ET_GESTURE_TAP) {
85 ShowBubble(); 85 ShowBubble();
86 event->SetHandled(); 86 event->SetHandled();
87 } 87 }
88 } 88 }
89 89
90 void TooltipIcon::GetAccessibleState(ui::AXViewState* state) { 90 void TooltipIcon::GetAccessibleNodeData(ui::AXNodeData* node_data) {
91 state->name = tooltip_; 91 node_data->SetName(tooltip_);
92 } 92 }
93 93
94 void TooltipIcon::MouseMovedOutOfHost() { 94 void TooltipIcon::MouseMovedOutOfHost() {
95 if (IsMouseHovered()) { 95 if (IsMouseHovered()) {
96 mouse_watcher_->Start(); 96 mouse_watcher_->Start();
97 return; 97 return;
98 } 98 }
99 99
100 mouse_inside_ = false; 100 mouse_inside_ = false;
101 HideBubble(); 101 HideBubble();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 void TooltipIcon::OnWidgetDestroyed(views::Widget* widget) { 140 void TooltipIcon::OnWidgetDestroyed(views::Widget* widget) {
141 observer_.Remove(widget); 141 observer_.Remove(widget);
142 142
143 SetDrawAsHovered(false); 143 SetDrawAsHovered(false);
144 mouse_watcher_.reset(); 144 mouse_watcher_.reset();
145 bubble_ = NULL; 145 bubble_ = NULL;
146 } 146 }
147 147
148 } // namespace autofill 148 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/autofill/tooltip_icon.h ('k') | chrome/browser/ui/views/bookmarks/bookmark_bar_instructions_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698