| 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_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/string16.h" | 11 #include "base/string16.h" |
| 12 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Font; | 15 class Font; |
| 16 class Point; | 16 class Point; |
| 17 class Rect; | 17 class Rect; |
| 18 class RectF; |
| 18 } | 19 } |
| 19 | 20 |
| 20 // This interface provides data to an AutofillPopupView. | 21 // This interface provides data to an AutofillPopupView. |
| 21 class AutofillPopupController { | 22 class AutofillPopupController { |
| 22 public: | 23 public: |
| 23 // Called when the view is going down. | 24 // Called when the view is going down. |
| 24 virtual void ViewDestroyed() = 0; | 25 virtual void ViewDestroyed() = 0; |
| 25 | 26 |
| 26 // Recalculates the height and width of the popup and triggers a redraw. | 27 // Recalculates the height and width of the popup and triggers a redraw. |
| 27 virtual void UpdateBoundsAndRedrawPopup() = 0; | 28 virtual void UpdateBoundsAndRedrawPopup() = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 52 // the top left of the popup. | 53 // the top left of the popup. |
| 53 virtual gfx::Rect GetRowBounds(size_t index) = 0; | 54 virtual gfx::Rect GetRowBounds(size_t index) = 0; |
| 54 | 55 |
| 55 // The actual bounds of the popup. | 56 // The actual bounds of the popup. |
| 56 virtual const gfx::Rect& popup_bounds() const = 0; | 57 virtual const gfx::Rect& popup_bounds() const = 0; |
| 57 | 58 |
| 58 // The view that the form field element sits in. | 59 // The view that the form field element sits in. |
| 59 virtual gfx::NativeView container_view() const = 0; | 60 virtual gfx::NativeView container_view() const = 0; |
| 60 | 61 |
| 61 // The bounds of the form field element (screen coordinates). | 62 // The bounds of the form field element (screen coordinates). |
| 62 virtual const gfx::Rect& element_bounds() const = 0; | 63 virtual const gfx::RectF& element_bounds() const = 0; |
| 63 | 64 |
| 64 // The main labels for each autofill item. | 65 // The main labels for each autofill item. |
| 65 virtual const std::vector<string16>& names() const = 0; | 66 virtual const std::vector<string16>& names() const = 0; |
| 66 | 67 |
| 67 // Smaller labels for each autofill item. | 68 // Smaller labels for each autofill item. |
| 68 virtual const std::vector<string16>& subtexts() const = 0; | 69 virtual const std::vector<string16>& subtexts() const = 0; |
| 69 | 70 |
| 70 // A string which identifies the icon to be shown for each autofill item. | 71 // A string which identifies the icon to be shown for each autofill item. |
| 71 virtual const std::vector<string16>& icons() const = 0; | 72 virtual const std::vector<string16>& icons() const = 0; |
| 72 | 73 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 83 virtual int selected_line() const = 0; | 84 virtual int selected_line() const = 0; |
| 84 | 85 |
| 85 // Returns true if the delete icon of the selected line is currently hovered. | 86 // Returns true if the delete icon of the selected line is currently hovered. |
| 86 virtual bool delete_icon_hovered() const = 0; | 87 virtual bool delete_icon_hovered() const = 0; |
| 87 | 88 |
| 88 protected: | 89 protected: |
| 89 virtual ~AutofillPopupController() {} | 90 virtual ~AutofillPopupController() {} |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ | 93 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ |
| OLD | NEW |