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

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

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: Combines 2 calls to InvalidateRow to 1 OnSelectedRowChanged call. 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_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" 15 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
16 #include "third_party/skia/include/core/SkColor.h" 16 #include "third_party/skia/include/core/SkColor.h"
17 #include "ui/native_theme/native_theme.h" 17 #include "ui/native_theme/native_theme.h"
18 18
19 namespace autofill { 19 namespace autofill {
20 20
21 class AutofillPopupLayoutModel; 21 class AutofillPopupLayoutModel;
22 struct Suggestion; 22 struct Suggestion;
23 23
24 // This interface provides data to an AutofillPopupView. 24 // This interface provides data to an AutofillPopupView.
25 class AutofillPopupController : public AutofillPopupViewDelegate { 25 class AutofillPopupController : public AutofillPopupViewDelegate {
26 public: 26 public:
27 // Recalculates the height and width of the popup and triggers a redraw. 27 // Recalculates the height and width of the popup and triggers a redraw when
28 virtual void UpdateBoundsAndRedrawPopup() = 0; 28 // suggestions change.
29 virtual void OnSuggestionsChanged() = 0;
29 30
30 // Accepts the suggestion at |index|. 31 // Accepts the suggestion at |index|.
31 virtual void AcceptSuggestion(size_t index) = 0; 32 virtual void AcceptSuggestion(size_t index) = 0;
32 33
33 // Returns the number of lines of data that there are. 34 // Returns the number of lines of data that there are.
34 virtual size_t GetLineCount() const = 0; 35 virtual size_t GetLineCount() const = 0;
35 36
36 // Returns the suggestion or pre-elided string at the given row index. 37 // Returns the suggestion or pre-elided string at the given row index.
37 virtual const autofill::Suggestion& GetSuggestionAt(size_t row) const = 0; 38 virtual const autofill::Suggestion& GetSuggestionAt(size_t row) const = 0;
38 virtual const base::string16& GetElidedValueAt(size_t row) const = 0; 39 virtual const base::string16& GetElidedValueAt(size_t row) const = 0;
(...skipping 19 matching lines...) Expand all
58 59
59 virtual const AutofillPopupLayoutModel& layout_model() const = 0; 60 virtual const AutofillPopupLayoutModel& layout_model() const = 0;
60 61
61 protected: 62 protected:
62 ~AutofillPopupController() override {} 63 ~AutofillPopupController() override {}
63 }; 64 };
64 65
65 } // namespace autofill 66 } // namespace autofill
66 67
67 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_ 68 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698