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

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

Issue 1570783003: [Autofill] Move functions from the AutofillPopupController to AutofillPopupLayoutModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: controller now owns the helper Created 4 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/ui/autofill/autofill_popup_view_delegate.h
diff --git a/chrome/browser/ui/autofill/autofill_popup_view_delegate.h b/chrome/browser/ui/autofill/autofill_popup_view_delegate.h
index e4320fd3f639348c2e7999841bccd00f6b28dc40..feaee1d8477d5a8ae159ce1d9a0f4ee7bc4b7f07 100644
--- a/chrome/browser/ui/autofill/autofill_popup_view_delegate.h
+++ b/chrome/browser/ui/autofill/autofill_popup_view_delegate.h
@@ -5,6 +5,9 @@
#ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_DELEGATE_H_
#define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_DELEGATE_H_
+#include <stddef.h>
+#include <vector>
+
#include "ui/gfx/native_widget_types.h"
namespace gfx {
@@ -15,6 +18,8 @@ class RectF;
namespace autofill {
+struct Suggestion;
+
// Base class for Controllers of Autofill-style popups. This interface is
// used by the relevant views to communicate with the controller.
class AutofillPopupViewDelegate {
@@ -39,7 +44,7 @@ class AutofillPopupViewDelegate {
virtual void SelectionCleared() = 0;
// The actual bounds of the popup.
- virtual const gfx::Rect& popup_bounds() const = 0;
+ virtual gfx::Rect popup_bounds() const = 0;
// The view that the form field element sits in.
virtual gfx::NativeView container_view() = 0;
@@ -50,6 +55,15 @@ class AutofillPopupViewDelegate {
// If the current popup should be displayed in RTL mode.
virtual bool IsRTL() const = 0;
+ // Returns the full set of autofill suggestions, if applicable.
+ virtual const std::vector<autofill::Suggestion> GetSuggestions() = 0;
+
+#if !defined(OS_ANDROID)
+ // Returns elided values and labels for the given |row|.
+ virtual int GetElidedValueWidthForRow(size_t row) = 0;
+ virtual int GetElidedLabelWidthForRow(size_t row) = 0;
+#endif
+
protected:
virtual ~AutofillPopupViewDelegate() {}
};

Powered by Google App Engine
This is Rietveld 408576698