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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 class TooltipIcon : public views::ImageView, | 23 class TooltipIcon : public views::ImageView, |
24 public views::MouseWatcherListener, | 24 public views::MouseWatcherListener, |
25 public views::WidgetObserver { | 25 public views::WidgetObserver { |
26 public: | 26 public: |
27 static const char kViewClassName[]; | 27 static const char kViewClassName[]; |
28 | 28 |
29 explicit TooltipIcon(const base::string16& tooltip); | 29 explicit TooltipIcon(const base::string16& tooltip); |
30 virtual ~TooltipIcon(); | 30 virtual ~TooltipIcon(); |
31 | 31 |
32 // views::ImageView: | 32 // views::ImageView: |
33 virtual const char* GetClassName() const OVERRIDE; | 33 virtual const char* GetClassName() const override; |
34 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; | 34 virtual void OnMouseEntered(const ui::MouseEvent& event) override; |
35 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 35 virtual void OnMouseExited(const ui::MouseEvent& event) override; |
36 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 36 virtual void OnGestureEvent(ui::GestureEvent* event) override; |
37 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; | 37 virtual void GetAccessibleState(ui::AXViewState* state) override; |
38 | 38 |
39 // views::MouseWatcherListener: | 39 // views::MouseWatcherListener: |
40 virtual void MouseMovedOutOfHost() OVERRIDE; | 40 virtual void MouseMovedOutOfHost() override; |
41 | 41 |
42 // views::WidgetObserver: | 42 // views::WidgetObserver: |
43 virtual void OnWidgetDestroyed(views::Widget* widget) OVERRIDE; | 43 virtual void OnWidgetDestroyed(views::Widget* widget) override; |
44 | 44 |
45 private: | 45 private: |
46 // Changes this view's image to the resource indicated by |idr|. | 46 // Changes this view's image to the resource indicated by |idr|. |
47 void ChangeImageTo(int idr); | 47 void ChangeImageTo(int idr); |
48 | 48 |
49 // Creates and shows |bubble_|. If |bubble_| already exists, just cancels a | 49 // Creates and shows |bubble_|. If |bubble_| already exists, just cancels a |
50 // potential close timer. | 50 // potential close timer. |
51 void ShowBubble(); | 51 void ShowBubble(); |
52 | 52 |
53 // Hides |bubble_| if necessary. | 53 // Hides |bubble_| if necessary. |
(...skipping 15 matching lines...) Expand all Loading... |
69 scoped_ptr<views::MouseWatcher> mouse_watcher_; | 69 scoped_ptr<views::MouseWatcher> mouse_watcher_; |
70 | 70 |
71 ScopedObserver<views::Widget, TooltipIcon> observer_; | 71 ScopedObserver<views::Widget, TooltipIcon> observer_; |
72 | 72 |
73 DISALLOW_COPY_AND_ASSIGN(TooltipIcon); | 73 DISALLOW_COPY_AND_ASSIGN(TooltipIcon); |
74 }; | 74 }; |
75 | 75 |
76 } // namespace autofill | 76 } // namespace autofill |
77 | 77 |
78 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ | 78 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_TOOLTIP_ICON_H_ |
OLD | NEW |