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/basictypes.h" | 7 #include "base/basictypes.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 "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 DISALLOW_COPY_AND_ASSIGN(TooltipBubble); | 47 DISALLOW_COPY_AND_ASSIGN(TooltipBubble); |
48 }; | 48 }; |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 TooltipIcon::TooltipIcon(const base::string16& tooltip) | 52 TooltipIcon::TooltipIcon(const base::string16& tooltip) |
53 : tooltip_(tooltip), | 53 : tooltip_(tooltip), |
54 mouse_inside_(false), | 54 mouse_inside_(false), |
55 bubble_(NULL) { | 55 bubble_(NULL) { |
56 ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON); | 56 ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON); |
57 set_focusable(true); | 57 SetFocusable(true); |
58 } | 58 } |
59 | 59 |
60 TooltipIcon::~TooltipIcon() { | 60 TooltipIcon::~TooltipIcon() { |
61 HideBubble(); | 61 HideBubble(); |
62 } | 62 } |
63 | 63 |
64 // static | 64 // static |
65 const char TooltipIcon::kViewClassName[] = "autofill/TooltipIcon"; | 65 const char TooltipIcon::kViewClassName[] = "autofill/TooltipIcon"; |
66 | 66 |
67 const char* TooltipIcon::GetClassName() const { | 67 const char* TooltipIcon::GetClassName() const { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 return; | 140 return; |
141 | 141 |
142 ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON); | 142 ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON); |
143 | 143 |
144 mouse_watcher_.reset(); | 144 mouse_watcher_.reset(); |
145 bubble_->Hide(); | 145 bubble_->Hide(); |
146 bubble_ = NULL; | 146 bubble_ = NULL; |
147 } | 147 } |
148 | 148 |
149 } // namespace autofill | 149 } // namespace autofill |
OLD | NEW |