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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; | 42 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
43 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; | 43 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
44 virtual void OnWidgetBoundsChanged(views::Widget* widget, | 44 virtual void OnWidgetBoundsChanged(views::Widget* widget, |
45 const gfx::Rect& new_bounds) OVERRIDE; | 45 const gfx::Rect& new_bounds) OVERRIDE; |
46 | 46 |
47 // Draw the given autofill entry in |entry_rect|. | 47 // Draw the given autofill entry in |entry_rect|. |
48 void DrawAutofillEntry(gfx::Canvas* canvas, | 48 void DrawAutofillEntry(gfx::Canvas* canvas, |
49 int index, | 49 int index, |
50 const gfx::Rect& entry_rect); | 50 const gfx::Rect& entry_rect); |
51 | 51 |
52 // Set the initial bounds of the popup to show, including the placement | |
53 // of it. | |
54 void SetInitialBounds(); | |
55 | |
56 // Get the size of the screen that the popup appears of, in pixels. | |
57 gfx::Size GetScreenSize(); | |
58 | |
59 AutofillPopupController* controller_; // Weak reference. | 52 AutofillPopupController* controller_; // Weak reference. |
60 | 53 |
61 // The widget that |this| observes. Weak reference. | 54 // The widget that |this| observes. Weak reference. |
62 views::Widget* observing_widget_; | 55 views::Widget* observing_widget_; |
63 | 56 |
64 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); | 57 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews); |
65 }; | 58 }; |
66 | 59 |
67 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ | 60 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_POPUP_VIEW_VIEWS_H_ |
OLD | NEW |