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

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

Issue 2103243002: Factor out ContentViewAndroidDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 5 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 "chrome/browser/ui/autofill/autofill_popup_view.h" 14 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
15 #include "ui/android/view_android.h"
15 16
16 namespace gfx { 17 namespace gfx {
17 class Rect; 18 class Rect;
18 } 19 }
19 20
20 namespace autofill { 21 namespace autofill {
21 22
22 class AutofillPopupController; 23 class AutofillPopupController;
23 24
24 class AutofillPopupViewAndroid : public AutofillPopupView { 25 class AutofillPopupViewAndroid : public AutofillPopupView {
(...skipping 11 matching lines...) Expand all
36 void DeletionRequested(JNIEnv* env, 37 void DeletionRequested(JNIEnv* env,
37 const base::android::JavaParamRef<jobject>& obj, 38 const base::android::JavaParamRef<jobject>& obj,
38 jint list_index); 39 jint list_index);
39 40
40 void DeletionConfirmed(JNIEnv* env, 41 void DeletionConfirmed(JNIEnv* env,
41 const base::android::JavaParamRef<jobject>& obj); 42 const base::android::JavaParamRef<jobject>& obj);
42 43
43 void PopupDismissed(JNIEnv* env, 44 void PopupDismissed(JNIEnv* env,
44 const base::android::JavaParamRef<jobject>& obj); 45 const base::android::JavaParamRef<jobject>& obj);
45 46
47 void PopupDismissedInternal();
48
46 static bool RegisterAutofillPopupViewAndroid(JNIEnv* env); 49 static bool RegisterAutofillPopupViewAndroid(JNIEnv* env);
47 50
48 protected: 51 protected:
49 // AutofillPopupView implementation. 52 // AutofillPopupView implementation.
50 void Show() override; 53 void Show() override;
51 void Hide() override; 54 void Hide() override;
52 void InvalidateRow(size_t row) override; 55 void InvalidateRow(size_t row) override;
53 void UpdateBoundsAndRedrawPopup() override; 56 void UpdateBoundsAndRedrawPopup() override;
54 57
55 private: 58 private:
56 ~AutofillPopupViewAndroid() override; 59 ~AutofillPopupViewAndroid() override;
57 60
58 AutofillPopupController* controller_; // weak. 61 AutofillPopupController* controller_; // weak.
59 62
60 // The index of the last item the user long-pressed (they will be shown a 63 // The index of the last item the user long-pressed (they will be shown a
61 // confirmation dialog). 64 // confirmation dialog).
62 int deleting_index_; 65 int deleting_index_;
63 66
64 // The corresponding java object. 67 // The corresponding java object.
65 base::android::ScopedJavaGlobalRef<jobject> java_object_; 68 base::android::ScopedJavaGlobalRef<jobject> java_object_;
66 69
70 // Popup view
71 ui::ViewAndroid::ScopedAnchorView popup_view_;
72
67 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewAndroid); 73 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewAndroid);
68 }; 74 };
69 75
70 } // namespace autofill 76 } // namespace autofill
71 77
72 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_ 78 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698