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/views/autofill/autofill_popup_view_views.h

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: (int) to NSInteger 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/views/autofill/autofill_popup_view_views.h
diff --git a/chrome/browser/ui/views/autofill/autofill_popup_view_views.h b/chrome/browser/ui/views/autofill/autofill_popup_view_views.h
index 01f214b2e1f05b4604a48e686c7252c46741ea07..90567b7112e3d3f1679d779f920730ce531b5d64 100644
--- a/chrome/browser/ui/views/autofill/autofill_popup_view_views.h
+++ b/chrome/browser/ui/views/autofill/autofill_popup_view_views.h
@@ -8,6 +8,7 @@
#include <stddef.h>
#include "base/macros.h"
+#include "base/optional.h"
#include "chrome/browser/ui/autofill/autofill_popup_view.h"
#include "chrome/browser/ui/views/autofill/autofill_popup_base_view.h"
@@ -19,26 +20,35 @@ class AutofillPopupController;
class AutofillPopupViewViews : public AutofillPopupBaseView,
public AutofillPopupView {
public:
+ // |controller| should not be null.
AutofillPopupViewViews(AutofillPopupController* controller,
views::Widget* parent_widget);
+ ~AutofillPopupViewViews() override;
private:
- ~AutofillPopupViewViews() override;
+ FRIEND_TEST_ALL_PREFIXES(AutofillPopupViewViewsTest, OnSelectedRowChanged);
// AutofillPopupView implementation.
void Show() override;
void Hide() override;
- void InvalidateRow(size_t row) override;
- void UpdateBoundsAndRedrawPopup() override;
+ void OnSelectedRowChanged(base::Optional<int> previous_row_selection,
+ base::Optional<int> current_row_selection) override;
+ void OnSuggestionsChanged() override;
// views::Views implementation
void OnPaint(gfx::Canvas* canvas) override;
+ void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
// Draw the given autofill entry in |entry_rect|.
void DrawAutofillEntry(gfx::Canvas* canvas,
int index,
const gfx::Rect& entry_rect);
+ // Creates child views based on the suggestions given by |controller_|. These
+ // child views are used for accessibility events only. We need child views to
+ // populate the correct |AXNodeData| when user selects a suggestion.
+ void CreateChildViews();
+
AutofillPopupController* controller_; // Weak reference.
DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewViews);

Powered by Google App Engine
This is Rietveld 408576698