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

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_view.h

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: Uses int (instead of size_t) arguments for OnSelectedRowChanged because we need to pass -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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" 11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
12 #include "ui/accessibility/ax_enums.h"
12 13
13 namespace autofill { 14 namespace autofill {
14 15
15 class AutofillPopupController; 16 class AutofillPopupController;
16 17
17 // The interface for creating and controlling a platform-dependent 18 // The interface for creating and controlling a platform-dependent
18 // AutofillPopupView. 19 // AutofillPopupView.
19 class AutofillPopupView { 20 class AutofillPopupView {
20 public: 21 public:
22 static constexpr int kNoSelection = -1;
23
21 // Displays the Autofill popup and fills it in with data from the controller. 24 // Displays the Autofill popup and fills it in with data from the controller.
22 virtual void Show() = 0; 25 virtual void Show() = 0;
23 26
24 // Hides the popup from view. This will cause the popup to be deleted. 27 // Hides the popup from view. This will cause the popup to be deleted.
25 virtual void Hide() = 0; 28 virtual void Hide() = 0;
26 29
27 // Invalidates the given row and redraw it. 30 // Invalidates the given rows and redraws them. A value of |kNoSelection| for
28 virtual void InvalidateRow(size_t row) = 0; 31 // either parameter indicates the parameter does not correspond to a
32 // suggestion.
33 virtual void OnSelectedRowChanged(int previous_row_selection,
34 int current_row_selection) = 0;
29 35
30 // Refreshes the position of the popup. 36 // Refreshes the position and redraws popup when suggestions change.
31 virtual void UpdateBoundsAndRedrawPopup() = 0; 37 virtual void OnSuggestionsChanged() = 0;
32 38
33 // Factory function for creating the view. 39 // Factory function for creating the view.
34 static AutofillPopupView* Create(AutofillPopupController* controller); 40 static AutofillPopupView* Create(AutofillPopupController* controller);
35 41
36 protected: 42 protected:
37 virtual ~AutofillPopupView() {} 43 virtual ~AutofillPopupView() {}
38 }; 44 };
39 45
40 } // namespace autofill 46 } // namespace autofill
41 47
42 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 48 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698