OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_BASE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Show this popup. Idempotent. | 32 // Show this popup. Idempotent. |
33 void DoShow(); | 33 void DoShow(); |
34 | 34 |
35 // Hide the widget and delete |this|. | 35 // Hide the widget and delete |this|. |
36 void DoHide(); | 36 void DoHide(); |
37 | 37 |
38 // Update size of popup and paint. | 38 // Update size of popup and paint. |
39 void DoUpdateBoundsAndRedrawPopup(); | 39 void DoUpdateBoundsAndRedrawPopup(); |
40 | 40 |
| 41 // Gets the bounds of the popup before any rounding. Derived |
| 42 // classes should restrict their content to these bounds. |
| 43 gfx::Rect GetPopupBounds() const; |
| 44 |
41 private: | 45 private: |
42 friend class AutofillPopupBaseViewTest; | 46 friend class AutofillPopupBaseViewTest; |
43 | 47 |
44 // views::Views implementation. | 48 // views::Views implementation. |
45 void OnMouseCaptureLost() override; | 49 void OnMouseCaptureLost() override; |
46 bool OnMouseDragged(const ui::MouseEvent& event) override; | 50 bool OnMouseDragged(const ui::MouseEvent& event) override; |
47 void OnMouseExited(const ui::MouseEvent& event) override; | 51 void OnMouseExited(const ui::MouseEvent& event) override; |
48 void OnMouseMoved(const ui::MouseEvent& event) override; | 52 void OnMouseMoved(const ui::MouseEvent& event) override; |
49 bool OnMousePressed(const ui::MouseEvent& event) override; | 53 bool OnMousePressed(const ui::MouseEvent& event) override; |
50 void OnMouseReleased(const ui::MouseEvent& event) override; | 54 void OnMouseReleased(const ui::MouseEvent& event) override; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 base::Time show_time_; | 86 base::Time show_time_; |
83 | 87 |
84 base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_; | 88 base::WeakPtrFactory<AutofillPopupBaseView> weak_ptr_factory_; |
85 | 89 |
86 DISALLOW_COPY_AND_ASSIGN(AutofillPopupBaseView); | 90 DISALLOW_COPY_AND_ASSIGN(AutofillPopupBaseView); |
87 }; | 91 }; |
88 | 92 |
89 } // namespace autofill | 93 } // namespace autofill |
90 | 94 |
91 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ | 95 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_BASE_VIEW_H_ |
OLD | NEW |