| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 return; | 131 return; |
| 132 | 132 |
| 133 ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON); | 133 ChangeImageTo(IDR_AUTOFILL_TOOLTIP_ICON); |
| 134 | 134 |
| 135 mouse_watcher_.reset(); | 135 mouse_watcher_.reset(); |
| 136 bubble_->Hide(); | 136 bubble_->Hide(); |
| 137 bubble_ = NULL; | 137 bubble_ = NULL; |
| 138 } | 138 } |
| 139 | 139 |
| 140 } // namespace autofill | 140 } // namespace autofill |
| OLD | NEW |