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 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" | 5 #include "chrome/browser/ui/android/autofill/autofill_popup_view_android.h" |
6 | 6 |
7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
9 #include "chrome/browser/android/resource_mapper.h" | 9 #include "chrome/browser/android/resource_mapper.h" |
10 #include "chrome/browser/ui/android/window_android_helper.h" | 10 #include "chrome/browser/ui/android/window_android_helper.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 void AutofillPopupViewAndroid::Show() { | 29 void AutofillPopupViewAndroid::Show() { |
30 JNIEnv* env = base::android::AttachCurrentThread(); | 30 JNIEnv* env = base::android::AttachCurrentThread(); |
31 ui::ViewAndroid* view_android = controller_->container_view(); | 31 ui::ViewAndroid* view_android = controller_->container_view(); |
32 | 32 |
33 DCHECK(view_android); | 33 DCHECK(view_android); |
34 | 34 |
35 java_object_.Reset(Java_AutofillPopupBridge_create( | 35 java_object_.Reset(Java_AutofillPopupBridge_create( |
36 env, | 36 env, |
37 reinterpret_cast<intptr_t>(this), | 37 reinterpret_cast<intptr_t>(this), |
38 view_android->GetWindowAndroid()->GetJavaObject().obj(), | 38 view_android->GetWindowAndroid()->GetJavaObject().obj(), |
39 view_android->GetJavaObject().obj())); | 39 view_android->GetViewAndroidDelegate().obj())); |
40 | 40 |
41 UpdateBoundsAndRedrawPopup(); | 41 UpdateBoundsAndRedrawPopup(); |
42 } | 42 } |
43 | 43 |
44 void AutofillPopupViewAndroid::Hide() { | 44 void AutofillPopupViewAndroid::Hide() { |
45 controller_ = NULL; | 45 controller_ = NULL; |
46 JNIEnv* env = base::android::AttachCurrentThread(); | 46 JNIEnv* env = base::android::AttachCurrentThread(); |
47 Java_AutofillPopupBridge_dismiss(env, java_object_.obj()); | 47 Java_AutofillPopupBridge_dismiss(env, java_object_.obj()); |
48 } | 48 } |
49 | 49 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 return RegisterNativesImpl(env); | 111 return RegisterNativesImpl(env); |
112 } | 112 } |
113 | 113 |
114 // static | 114 // static |
115 AutofillPopupView* AutofillPopupView::Create( | 115 AutofillPopupView* AutofillPopupView::Create( |
116 AutofillPopupController* controller) { | 116 AutofillPopupController* controller) { |
117 return new AutofillPopupViewAndroid(controller); | 117 return new AutofillPopupViewAndroid(controller); |
118 } | 118 } |
119 | 119 |
120 } // namespace autofill | 120 } // namespace autofill |
OLD | NEW |