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

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: Created 8 years, 11 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..6acaa3d53e7722a5772a0d8bb78578a51a2c130f 100644
--- a/chrome/browser/autofill/autofill_popup_view.h
+++ b/chrome/browser/autofill/autofill_popup_view.h
@@ -18,9 +18,12 @@ 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.
@@ -34,6 +37,7 @@ class AutofillPopupView : public content::NotificationObserver {
const std::vector<int>& autofill_unique_ids,
int separator_index);
+ AutofillExternalDelegate* external_delegate() { return external_delegate_; }
void set_element_bounds(const gfx::Rect& bounds) {
element_bounds_ = bounds;
@@ -46,6 +50,9 @@ class AutofillPopupView : public content::NotificationObserver {
// Platform-dependent work.
virtual void ShowInternal() = 0;
+ // Invalide the given row and redraw it.
+ virtual void InvalidateRow(size_t row) = 0;
+
const std::vector<string16>& autofill_values() const {
return autofill_values_;
}
@@ -55,8 +62,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_; }
+ size_t selected_line() const { return selected_line_; }
+
+ // Change which line is currently selected by the user.
+ void SetSelectedLine(size_t selected_line);
+
private:
// content::NotificationObserver method override.
virtual void Observe(int type,
@@ -66,6 +81,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 +95,9 @@ 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.
+ size_t selected_line_;
};
#endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_

Powered by Google App Engine
This is Rietveld 408576698