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

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

Issue 9432029: GTK Keyboard Support for New Autofill (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Using keyboard listener to get keypresses Created 8 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_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Display the autofill popup and fill it in with the values passed in. 47 // Display the autofill popup and fill it in with the values passed in.
48 // Platform-dependent work. 48 // Platform-dependent work.
49 virtual void ShowInternal() = 0; 49 virtual void ShowInternal() = 0;
50 50
51 // Hide the popup from view. Platform-dependent work. 51 // Hide the popup from view. Platform-dependent work.
52 virtual void HideInternal() = 0; 52 virtual void HideInternal() = 0;
53 53
54 // Invalide the given row and redraw it. 54 // Invalide the given row and redraw it.
55 virtual void InvalidateRow(size_t row) = 0; 55 virtual void InvalidateRow(size_t row) = 0;
56 56
57 // Update the popup size to match the current Autofill values.
58 virtual void UpdatePopupSize() = 0;
Ilya Sherman 2012/03/15 20:10:56 This method does not seem to be used. If the moti
csharp 2012/03/21 15:32:28 Done.
59
57 AutofillExternalDelegate* external_delegate() { return external_delegate_; } 60 AutofillExternalDelegate* external_delegate() { return external_delegate_; }
58 61
59 const std::vector<string16>& autofill_values() const { 62 const std::vector<string16>& autofill_values() const {
60 return autofill_values_; 63 return autofill_values_;
61 } 64 }
62 const std::vector<string16>& autofill_labels() const { 65 const std::vector<string16>& autofill_labels() const {
63 return autofill_labels_; 66 return autofill_labels_;
64 } 67 }
65 const std::vector<string16>& autofill_icons() const { 68 const std::vector<string16>& autofill_icons() const {
66 return autofill_icons_; 69 return autofill_icons_;
67 } 70 }
68 const std::vector<int>& autofill_unique_ids() const { 71 const std::vector<int>& autofill_unique_ids() const {
69 return autofill_unique_ids_; 72 return autofill_unique_ids_;
70 } 73 }
71 int separator_index() const { return separator_index_; } 74 int separator_index() const { return separator_index_; }
72 75
73 int selected_line() const { return selected_line_; } 76 int selected_line() const { return selected_line_; }
74 77
75 // Change which line is currently selected by the user. 78 // Change which line is currently selected by the user.
76 void SetSelectedLine(int selected_line); 79 void SetSelectedLine(int selected_line);
77 80
81 // Increase the selected line by 1, properly handling wrapping.
82 void IncreaseSelectedLine();
Ilya Sherman 2012/03/15 20:10:56 nit: Perhaps "SelectNextLine()"?
csharp 2012/03/21 15:32:28 Done.
83
84 // Decrease the selected line by 1, properly handling wrapping.
85 void DecreaseSelectedLine();
Ilya Sherman 2012/03/15 20:10:56 nit: Perhaps "SelectPreviousLine()"?
csharp 2012/03/21 15:32:28 Done.
86
87 // The user has choosen line |line|.
88 void ChooseLine(int line);
Ilya Sherman 2012/03/15 20:10:56 nit: Perhaps "AcceptLine()", to match the use of "
Ilya Sherman 2012/03/15 20:10:56 Can we remove the |line| parameter, and always acc
csharp 2012/03/21 15:32:28 Done.
89
90 // The user has removed a suggestion.
91 void RemoveLine(int line);
92
78 private: 93 private:
79 // content::NotificationObserver method override. 94 // content::NotificationObserver method override.
80 virtual void Observe(int type, 95 virtual void Observe(int type,
81 const content::NotificationSource& source, 96 const content::NotificationSource& source,
82 const content::NotificationDetails& details) OVERRIDE; 97 const content::NotificationDetails& details) OVERRIDE;
83 98
84 // A scoped container for notification registries. 99 // A scoped container for notification registries.
85 content::NotificationRegistrar registrar_; 100 content::NotificationRegistrar registrar_;
86 101
87 AutofillExternalDelegate* external_delegate_; 102 AutofillExternalDelegate* external_delegate_;
(...skipping 10 matching lines...) Expand all
98 // The location of the separator index (which separates the returned values 113 // The location of the separator index (which separates the returned values
99 // from the Autofill options). 114 // from the Autofill options).
100 int separator_index_; 115 int separator_index_;
101 116
102 // The line that is currently selected by the user. 117 // The line that is currently selected by the user.
103 // -1 indicates that no line is currently selected. 118 // -1 indicates that no line is currently selected.
104 int selected_line_; 119 int selected_line_;
105 }; 120 };
106 121
107 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 122 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698