OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
7 | 7 |
8 #include "chrome/browser/ui/autofill/autofill_popup_view.h" | 8 #include "chrome/browser/ui/autofill/autofill_popup_view.h" |
9 #include "ui/views/widget/widget_delegate.h" | 9 #include "ui/views/widget/widget_delegate.h" |
10 #include "ui/views/widget/widget_observer.h" | 10 #include "ui/views/widget/widget_observer.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; | 38 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE; |
39 | 39 |
40 // views:Views implementation. | 40 // views:Views implementation. |
41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 41 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
42 virtual void OnMouseCaptureLost() OVERRIDE; | 42 virtual void OnMouseCaptureLost() OVERRIDE; |
43 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; | 43 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
44 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; | 44 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
45 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; | 45 virtual void OnMouseMoved(const ui::MouseEvent& event) OVERRIDE; |
46 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 46 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
47 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 47 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
| 48 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
48 | 49 |
49 // views::WidgetObserver implementation. | 50 // views::WidgetObserver implementation. |
50 virtual void OnWidgetBoundsChanged(views::Widget* widget, | 51 virtual void OnWidgetBoundsChanged(views::Widget* widget, |
51 const gfx::Rect& new_bounds) OVERRIDE; | 52 const gfx::Rect& new_bounds) OVERRIDE; |
52 | 53 |
53 // Hide the popup (Since either Hide or ~AutofillPopupViewViews can need to | 54 // Hide the popup (Since either Hide or ~AutofillPopupViewViews can need to |
54 // hide the popup, the actually hiding code must be placed here). | 55 // hide the popup, the actually hiding code must be placed here). |
55 void HideInternal(); | 56 void HideInternal(); |
56 | 57 |
57 // Draw the given autofill entry in |entry_rect|. | 58 // Draw the given autofill entry in |entry_rect|. |
58 void DrawAutofillEntry(gfx::Canvas* canvas, | 59 void DrawAutofillEntry(gfx::Canvas* canvas, |
59 int index, | 60 int index, |
60 const gfx::Rect& entry_rect); | 61 const gfx::Rect& entry_rect); |
61 | 62 |
62 AutofillPopupController* controller_; // Weak reference. | 63 AutofillPopupController* controller_; // Weak reference. |
63 | 64 |
64 // The widget that |this| observes. Weak reference. | 65 // The widget that |this| observes. Weak reference. |
65 views::Widget* observing_widget_; | 66 views::Widget* observing_widget_; |
66 | 67 |
67 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); | 68 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); |
68 }; | 69 }; |
69 | 70 |
70 } // namespace autofill | 71 } // namespace autofill |
71 | 72 |
72 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
OLD | NEW |