| OLD | NEW |
| 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_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H_ |
| 7 | 7 |
| 8 #include <jni.h> | 8 #include <jni.h> |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 void ViewDismissed(JNIEnv* env, | 44 void ViewDismissed(JNIEnv* env, |
| 45 const base::android::JavaParamRef<jobject>& obj); | 45 const base::android::JavaParamRef<jobject>& obj); |
| 46 | 46 |
| 47 static bool RegisterAutofillKeyboardAccessoryView(JNIEnv* env); | 47 static bool RegisterAutofillKeyboardAccessoryView(JNIEnv* env); |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 // AutofillPopupView implementation. | 50 // AutofillPopupView implementation. |
| 51 void Show() override; | 51 void Show() override; |
| 52 void Hide() override; | 52 void Hide() override; |
| 53 void InvalidateRow(size_t row) override; | 53 void OnSelectedRowChanged(base::Optional<int> previous_row_selection, |
| 54 void UpdateBoundsAndRedrawPopup() override; | 54 base::Optional<int> current_row_selection) override; |
| 55 void OnSuggestionsChanged() override; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 ~AutofillKeyboardAccessoryView() override; | 58 ~AutofillKeyboardAccessoryView() override; |
| 58 | 59 |
| 59 AutofillPopupController* controller_; // weak. | 60 AutofillPopupController* controller_; // weak. |
| 60 | 61 |
| 61 // The index of the last item the user long-pressed (they will be shown a | 62 // The index of the last item the user long-pressed (they will be shown a |
| 62 // confirmation dialog). | 63 // confirmation dialog). |
| 63 int deleting_index_; | 64 int deleting_index_; |
| 64 | 65 |
| 65 // Mapping from Java list index to autofill suggestion index. | 66 // Mapping from Java list index to autofill suggestion index. |
| 66 std::vector<int> positions_; | 67 std::vector<int> positions_; |
| 67 | 68 |
| 68 // The corresponding java object. | 69 // The corresponding java object. |
| 69 base::android::ScopedJavaGlobalRef<jobject> java_object_; | 70 base::android::ScopedJavaGlobalRef<jobject> java_object_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(AutofillKeyboardAccessoryView); | 72 DISALLOW_COPY_AND_ASSIGN(AutofillKeyboardAccessoryView); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 } // namespace autofill | 75 } // namespace autofill |
| 75 | 76 |
| 76 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H
_ | 77 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H
_ |
| OLD | NEW |