Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4185)

Unified Diff: chrome/browser/autofill/autofill_popup_view.h

Issue 9235072: Adding Mouse Support for new GTK Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Responding to comments Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9344ee0278830e3632b249a2fc4abf625b3cbc6c..1ca890871d350d846787c2da28aa1f1c505318ef 100644
--- a/chrome/browser/autofill/autofill_popup_view.h
+++ b/chrome/browser/autofill/autofill_popup_view.h
@@ -18,13 +18,16 @@ namespace content {
class WebContents;
}
+class AutofillExternalDelegate;
+
class AutofillPopupView : public content::NotificationObserver {
public:
- explicit AutofillPopupView(content::WebContents* web_contents);
+ explicit AutofillPopupView(content::WebContents* web_contents,
+ AutofillExternalDelegate* external_delegate_);
virtual ~AutofillPopupView();
- // Hide the popup from view.
- virtual void Hide() = 0;
+ // Hide the popup from view. Platform-indepent work.
+ virtual void Hide();
// Display the autofill popup and fill it in with the values passed in.
// Platform-independent work.
@@ -34,7 +37,6 @@ class AutofillPopupView : public content::NotificationObserver {
const std::vector<int>& autofill_unique_ids,
int separator_index);
-
void set_element_bounds(const gfx::Rect& bounds) {
element_bounds_ = bounds;
}
@@ -46,6 +48,14 @@ class AutofillPopupView : public content::NotificationObserver {
// Platform-dependent work.
virtual void ShowInternal() = 0;
+ // Hide the popup from view. Platform-dependent work.
+ virtual void HideInternal() = 0;
+
+ // Invalide the given row and redraw it.
+ virtual void InvalidateRow(size_t row) = 0;
+
+ AutofillExternalDelegate* external_delegate() { return external_delegate_; }
+
const std::vector<string16>& autofill_values() const {
return autofill_values_;
}
@@ -55,8 +65,16 @@ class AutofillPopupView : public content::NotificationObserver {
const std::vector<string16>& autofill_icons() const {
return autofill_icons_;
}
+ const std::vector<int>& autofill_unique_ids() const {
+ return autofill_unique_ids_;
+ }
int separator_index() const { return separator_index_; }
+ int selected_line() const { return selected_line_; }
+
+ // Change which line is currently selected by the user.
+ void SetSelectedLine(int selected_line);
+
private:
// content::NotificationObserver method override.
virtual void Observe(int type,
@@ -66,6 +84,8 @@ class AutofillPopupView : public content::NotificationObserver {
// A scoped container for notification registries.
content::NotificationRegistrar registrar_;
+ AutofillExternalDelegate* external_delegate_;
+
// The bounds of the text element that is the focus of the Autofill.
gfx::Rect element_bounds_;
@@ -78,6 +98,10 @@ class AutofillPopupView : public content::NotificationObserver {
// The location of the separator index (which separates the returned values
// from the Autofill options).
int separator_index_;
+
+ // The line that is currently selected by the user.
+ // -1 indicates that no line is currently selected.
+ int selected_line_;
};
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698