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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
6 #define CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_
10 #include "base/android/scoped_java_ref.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/ui/autofill/autofill_popup_view.h"
20 class AutofillPopupController
;
22 class AutofillPopupViewAndroid
: public AutofillPopupView
{
24 explicit AutofillPopupViewAndroid(AutofillPopupController
* controller
);
26 // --------------------------------------------------------------------------
27 // Methods called from Java via JNI
28 // --------------------------------------------------------------------------
29 // Called when an autofill item was selected.
30 void SuggestionSelected(JNIEnv
* env
, jobject obj
, jint list_index
);
32 void RequestHide(JNIEnv
* env
, jobject obj
);
34 static bool RegisterAutofillPopupViewAndroid(JNIEnv
* env
);
37 // AutofillPopupView implementation.
38 virtual void Show() OVERRIDE
;
39 virtual void Hide() OVERRIDE
;
40 virtual void InvalidateRow(size_t row
) OVERRIDE
;
41 virtual void UpdateBoundsAndRedrawPopup() OVERRIDE
;
44 virtual ~AutofillPopupViewAndroid();
46 AutofillPopupController
* controller_
; // weak.
48 // The corresponding java object.
49 base::android::ScopedJavaGlobalRef
<jobject
> java_object_
;
51 DISALLOW_COPY_AND_ASSIGN(AutofillPopupViewAndroid
);
54 } // namespace autofill
56 #endif // CHROME_BROWSER_UI_ANDROID_AUTOFILL_AUTOFILL_POPUP_VIEW_ANDROID_H_