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

Side by Side Diff: chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h

Issue 1281323003: Remove items on long press in keyboard accessory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Null out context. Rebase. Created 5 years, 4 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_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 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 15 matching lines...) Expand all
26 class AutofillKeyboardAccessoryView : public AutofillPopupView { 26 class AutofillKeyboardAccessoryView : public AutofillPopupView {
27 public: 27 public:
28 explicit AutofillKeyboardAccessoryView(AutofillPopupController* controller); 28 explicit AutofillKeyboardAccessoryView(AutofillPopupController* controller);
29 29
30 // -------------------------------------------------------------------------- 30 // --------------------------------------------------------------------------
31 // Methods called from Java via JNI 31 // Methods called from Java via JNI
32 // -------------------------------------------------------------------------- 32 // --------------------------------------------------------------------------
33 // Called when an autofill item was selected. 33 // Called when an autofill item was selected.
34 void SuggestionSelected(JNIEnv* env, jobject obj, jint list_index); 34 void SuggestionSelected(JNIEnv* env, jobject obj, jint list_index);
35 35
36 void DeletionRequested(JNIEnv* env, jobject obj, jint list_index);
37
38 void DeletionConfirmed(JNIEnv* env, jobject obj);
39
36 void ViewDismissed(JNIEnv* env, jobject obj); 40 void ViewDismissed(JNIEnv* env, jobject obj);
37 41
38 static bool RegisterAutofillKeyboardAccessoryView(JNIEnv* env); 42 static bool RegisterAutofillKeyboardAccessoryView(JNIEnv* env);
39 43
40 protected: 44 protected:
41 // AutofillPopupView implementation. 45 // AutofillPopupView implementation.
42 void Show() override; 46 void Show() override;
43 void Hide() override; 47 void Hide() override;
44 void InvalidateRow(size_t row) override; 48 void InvalidateRow(size_t row) override;
45 void UpdateBoundsAndRedrawPopup() override; 49 void UpdateBoundsAndRedrawPopup() override;
46 50
47 private: 51 private:
48 ~AutofillKeyboardAccessoryView() override; 52 ~AutofillKeyboardAccessoryView() override;
49 53
50 AutofillPopupController* controller_; // weak. 54 AutofillPopupController* controller_; // weak.
51 55
56 // The index of the last item the user long-pressed (they will be shown a
57 // confirmation dialog).
58 int deleting_index_;
59
52 // The corresponding java object. 60 // The corresponding java object.
53 base::android::ScopedJavaGlobalRef<jobject> java_object_; 61 base::android::ScopedJavaGlobalRef<jobject> java_object_;
54 62
55 DISALLOW_COPY_AND_ASSIGN(AutofillKeyboardAccessoryView); 63 DISALLOW_COPY_AND_ASSIGN(AutofillKeyboardAccessoryView);
56 }; 64 };
57 65
58 } // namespace autofill 66 } // namespace autofill
59 67
60 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H _ 68 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_KEYBOARD_ACCESSORY_VIEW_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698