Chromium Code Reviews| Index: chrome/browser/autofill/autofill_popup_view.h |
| diff --git a/chrome/browser/autofill/autofill_popup_view.h b/chrome/browser/autofill/autofill_popup_view.h |
| index bde5cd226e587e51233dcbb3e900f006a55f0d70..4128cbe8f6de3a4feb40b5009be4f9a5e0b8e411 100644 |
| --- a/chrome/browser/autofill/autofill_popup_view.h |
| +++ b/chrome/browser/autofill/autofill_popup_view.h |
| @@ -6,6 +6,8 @@ |
| #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |
| #pragma once |
| +#include <vector> |
| + |
| #include "base/compiler_specific.h" |
| #include "base/string16.h" |
| #include "content/public/browser/notification_registrar.h" |
| @@ -25,11 +27,12 @@ class AutofillPopupView : public content::NotificationObserver { |
| virtual void Hide() = 0; |
| // Display the autofill popup and fill it in with the values passed in. |
| - virtual void Show(const std::vector<string16>& autofill_values, |
| - const std::vector<string16>& autofill_labels, |
| - const std::vector<string16>& autofill_icons, |
| - const std::vector<int>& autofill_unique_ids, |
| - int separator_index) = 0; |
| + // Platform-Independent work. |
|
Ilya Sherman
2012/01/13 02:45:37
nit: "Independent" -> "independent"
csharp
2012/01/13 18:09:03
Done.
|
| + void Show(const std::vector<string16>& autofill_values, |
| + const std::vector<string16>& autofill_labels, |
| + const std::vector<string16>& autofill_icons, |
| + const std::vector<int>& autofill_unique_ids, |
| + int separator_index); |
| void set_element_bounds(const gfx::Rect& bounds) { |
| @@ -38,6 +41,22 @@ class AutofillPopupView : public content::NotificationObserver { |
| const gfx::Rect& element_bounds() { return element_bounds_; } |
| + protected: |
| + // Display the autofill popup and fill it in with the values passed in. |
| + // Platform-dependent work. |
| + virtual void ShowInternal() = 0; |
| + |
| + const std::vector<string16>& autofill_values() const { |
| + return autofill_values_; |
| + } |
| + const std::vector<string16>& autofill_labels() const { |
| + return autofill_labels_; |
| + } |
| + const std::vector<string16>& autofill_icons() const { |
| + return autofill_icons_; |
| + } |
| + const int separator_index() const { return separator_index_; } |
| + |
| private: |
| // content::NotificationObserver method override. |
| virtual void Observe(int type, |
| @@ -49,6 +68,16 @@ class AutofillPopupView : public content::NotificationObserver { |
| // The bounds of the text element that is the focus of the Autofill. |
| gfx::Rect element_bounds_; |
| + |
| + // The current Autofill query values. |
| + std::vector<string16> autofill_values_; |
| + std::vector<string16> autofill_labels_; |
| + std::vector<string16> autofill_icons_; |
| + std::vector<int> autofill_unique_ids_; |
| + |
| + // The location of the separator index (which separates the returned values |
| + // from the Autofill options). |
| + int separator_index_; |
| }; |
| #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ |