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

Unified Diff: chrome/browser/ui/autofill/autofill_popup_controller.h

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: Uses base::Optional<size_t> instead of representing no selection as -1. Created 3 years, 9 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/ui/autofill/autofill_popup_controller.h
diff --git a/chrome/browser/ui/autofill/autofill_popup_controller.h b/chrome/browser/ui/autofill/autofill_popup_controller.h
index c9aec43f61bde65157c3d88dd5d74b8f0c8a022a..bae7801e95734986884aab5f114714f7ae94f7bb 100644
--- a/chrome/browser/ui/autofill/autofill_popup_controller.h
+++ b/chrome/browser/ui/autofill/autofill_popup_controller.h
@@ -10,6 +10,7 @@
#include <vector>
#include "base/compiler_specific.h"
+#include "base/optional.h"
#include "base/strings/string16.h"
#include "build/build_config.h"
#include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
@@ -24,8 +25,9 @@ struct Suggestion;
// This interface provides data to an AutofillPopupView.
class AutofillPopupController : public AutofillPopupViewDelegate {
public:
- // Recalculates the height and width of the popup and triggers a redraw.
- virtual void UpdateBoundsAndRedrawPopup() = 0;
+ // Recalculates the height and width of the popup and triggers a redraw when
+ // suggestions change.
+ virtual void OnSuggestionsChanged() = 0;
// Accepts the suggestion at |index|.
virtual void AcceptSuggestion(size_t index) = 0;
@@ -54,7 +56,7 @@ class AutofillPopupController : public AutofillPopupViewDelegate {
// Returns the index of the selected line. A line is "selected" when it is
// hovered or has keyboard focus.
- virtual int selected_line() const = 0;
+ virtual base::Optional<size_t> selected_line() const = 0;
virtual const AutofillPopupLayoutModel& layout_model() const = 0;

Powered by Google App Engine
This is Rietveld 408576698