OLD | NEW |
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_node_data.h" | 10 #include "ui/accessibility/ax_node_data.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(); |
102 } | 102 } |
103 | 103 |
104 void TooltipIcon::SetDrawAsHovered(bool hovered) { | 104 void TooltipIcon::SetDrawAsHovered(bool hovered) { |
105 SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::HELP_OUTLINE, 18, | 105 SetImage(gfx::CreateVectorIcon(gfx::VectorIconId::INFO_OUTLINE, 18, |
106 hovered | 106 hovered |
107 ? SkColorSetARGB(0xBD, 0, 0, 0) | 107 ? SkColorSetARGB(0xBD, 0, 0, 0) |
108 : SkColorSetARGB(0xBD, 0x44, 0x44, 0x44))); | 108 : SkColorSetARGB(0xBD, 0x44, 0x44, 0x44))); |
109 } | 109 } |
110 | 110 |
111 void TooltipIcon::ShowBubble() { | 111 void TooltipIcon::ShowBubble() { |
112 if (bubble_) | 112 if (bubble_) |
113 return; | 113 return; |
114 | 114 |
115 SetDrawAsHovered(true); | 115 SetDrawAsHovered(true); |
(...skipping 23 matching lines...) Expand all Loading... |
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 |
OLD | NEW |