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

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

Issue 2727233003: Uses child views in Autofill Popup so we can trigger (Closed)
Patch Set: Switches from size_t to int when we are not referring to size of an object. 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_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_ 5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_ 6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 10
11 #include "base/android/scoped_java_ref.h" 11 #include "base/android/scoped_java_ref.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/optional.h"
sky 2017/03/20 15:50:32 Similar comment as to other header.
csashi 2017/03/20 18:11:42 Can you confirm we don't use IWYU?
14 #include "chrome/browser/ui/autofill/autofill_popup_view.h" 15 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
15 #include "ui/android/view_android.h" 16 #include "ui/android/view_android.h"
16 17
17 namespace autofill { 18 namespace autofill {
18 19
19 class AutofillPopupController; 20 class AutofillPopupController;
20 21
21 class AutofillPopupViewAndroid : public AutofillPopupView { 22 class AutofillPopupViewAndroid : public AutofillPopupView {
22 public: 23 public:
23 explicit AutofillPopupViewAndroid(AutofillPopupController* controller); 24 explicit AutofillPopupViewAndroid(AutofillPopupController* controller);
(...skipping 15 matching lines...) Expand all
39 40
40 void PopupDismissed(JNIEnv* env, 41 void PopupDismissed(JNIEnv* env,
41 const base::android::JavaParamRef<jobject>& obj); 42 const base::android::JavaParamRef<jobject>& obj);
42 43
43 static bool RegisterAutofillPopupViewAndroid(JNIEnv* env); 44 static bool RegisterAutofillPopupViewAndroid(JNIEnv* env);
44 45
45 protected: 46 protected:
46 // AutofillPopupView implementation. 47 // AutofillPopupView implementation.
47 void Show() override; 48 void Show() override;
48 void Hide() override; 49 void Hide() override;
49 void InvalidateRow(size_t row) override; 50 void OnSelectedRowChanged(
50 void UpdateBoundsAndRedrawPopup() override; 51 base::Optional<int> previous_row_selection,
52 base::Optional<int> current_row_selection) override {}
sky 2017/03/20 15:50:32 Similar comment about override.
csashi 2017/03/20 18:11:42 Done.
53 void OnSuggestionsChanged() override;
51 54
52 private: 55 private:
53 ~AutofillPopupViewAndroid() override; 56 ~AutofillPopupViewAndroid() override;
54 57
55 AutofillPopupController* controller_; // weak. 58 AutofillPopupController* controller_; // weak.
56 59
57 // The index of the last item the user long-pressed (they will be shown a 60 // The index of the last item the user long-pressed (they will be shown a
58 // confirmation dialog). 61 // confirmation dialog).
59 int deleting_index_; 62 int deleting_index_;
60 63
61 // The corresponding java object. 64 // The corresponding java object.
62 base::android::ScopedJavaGlobalRef<jobject> java_object_; 65 base::android::ScopedJavaGlobalRef<jobject> java_object_;
63 66
64 // Popup view 67 // Popup view
65 ui::ViewAndroid::ScopedAnchorView popup_view_; 68 ui::ViewAndroid::ScopedAnchorView popup_view_;
66 69
67 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewAndroid); 70 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewAndroid);
68 }; 71 };
69 72
70 } // namespace autofill 73 } // namespace autofill
71 74
72 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_ 75 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698