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 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
9 #include "base/macros.h" | 11 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "base/scoped_observer.h" | 12 #include "base/scoped_observer.h" |
12 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
13 #include "base/timer/timer.h" | 14 #include "base/timer/timer.h" |
14 #include "ui/views/bubble/bubble_border.h" | 15 #include "ui/views/bubble/bubble_border.h" |
15 #include "ui/views/controls/image_view.h" | 16 #include "ui/views/controls/image_view.h" |
16 #include "ui/views/mouse_watcher.h" | 17 #include "ui/views/mouse_watcher.h" |
17 #include "ui/views/widget/widget_observer.h" | 18 #include "ui/views/widget/widget_observer.h" |
18 | 19 |
19 namespace autofill { | 20 namespace autofill { |
20 | 21 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // A bubble shown on hover. Weak; owns itself. NULL while hiding. | 68 // A bubble shown on hover. Weak; owns itself. NULL while hiding. |
68 InfoBubble* bubble_; | 69 InfoBubble* bubble_; |
69 | 70 |
70 // The position of the bubble's arrow. | 71 // The position of the bubble's arrow. |
71 views::BubbleBorder::Arrow bubble_arrow_; | 72 views::BubbleBorder::Arrow bubble_arrow_; |
72 | 73 |
73 // A timer to delay showing |bubble_|. | 74 // A timer to delay showing |bubble_|. |
74 base::OneShotTimer show_timer_; | 75 base::OneShotTimer show_timer_; |
75 | 76 |
76 // A watcher that keeps |bubble_| open if the user's mouse enters it. | 77 // A watcher that keeps |bubble_| open if the user's mouse enters it. |
77 scoped_ptr<views::MouseWatcher> mouse_watcher_; | 78 std::unique_ptr<views::MouseWatcher> mouse_watcher_; |
78 | 79 |
79 ScopedObserver<views::Widget, TooltipIcon> observer_; | 80 ScopedObserver<views::Widget, TooltipIcon> observer_; |
80 | 81 |
81 DISALLOW_COPY_AND_ASSIGN(TooltipIcon); | 82 DISALLOW_COPY_AND_ASSIGN(TooltipIcon); |
82 }; | 83 }; |
83 | 84 |
84 } // namespace autofill | 85 } // namespace autofill |
85 | 86 |
86 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ | 87 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ |
OLD | NEW |