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 "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "chrome/browser/android/resource_mapper.h" | 10 #include "chrome/browser/android/resource_mapper.h" |
11 #include "chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h" | 11 #include "chrome/browser/ui/android/autofill/autofill_keyboard_accessory_view.h" |
12 #include "chrome/browser/ui/android/view_android_helper.h" | 12 #include "chrome/browser/ui/android/view_android_helper.h" |
13 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" | 13 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
14 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" | 14 #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" |
15 #include "components/autofill/core/browser/popup_item_ids.h" | 15 #include "components/autofill/core/browser/popup_item_ids.h" |
16 #include "components/autofill/core/browser/suggestion.h" | 16 #include "components/autofill/core/browser/suggestion.h" |
17 #include "components/autofill/core/common/autofill_util.h" | 17 #include "components/autofill/core/common/autofill_util.h" |
18 #include "content/public/browser/android/content_view_core.h" | 18 #include "content/public/browser/android/content_view_core.h" |
19 #include "jni/AutofillPopupBridge_jni.h" | 19 #include "jni/AutofillPopupBridge_jni.h" |
20 #include "ui/android/view_android.h" | 20 #include "ui/android/view_android.h" |
21 #include "ui/android/window_android.h" | 21 #include "ui/android/window_android.h" |
22 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
23 #include "ui/gfx/android/java_bitmap.h" | 23 #include "ui/gfx/android/java_bitmap.h" |
24 #include "ui/gfx/geometry/rect_f.h" | 24 #include "ui/gfx/geometry/rect_f.h" |
25 | 25 |
| 26 using base::android::JavaParamRef; |
| 27 using base::android::ScopedJavaLocalRef; |
| 28 |
26 namespace autofill { | 29 namespace autofill { |
27 | 30 |
28 AutofillPopupViewAndroid::AutofillPopupViewAndroid( | 31 AutofillPopupViewAndroid::AutofillPopupViewAndroid( |
29 AutofillPopupController* controller) | 32 AutofillPopupController* controller) |
30 : controller_(controller), deleting_index_(-1) {} | 33 : controller_(controller), deleting_index_(-1) {} |
31 | 34 |
32 AutofillPopupViewAndroid::~AutofillPopupViewAndroid() {} | 35 AutofillPopupViewAndroid::~AutofillPopupViewAndroid() {} |
33 | 36 |
34 void AutofillPopupViewAndroid::Show() { | 37 void AutofillPopupViewAndroid::Show() { |
35 JNIEnv* env = base::android::AttachCurrentThread(); | 38 JNIEnv* env = base::android::AttachCurrentThread(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 // static | 157 // static |
155 AutofillPopupView* AutofillPopupView::Create( | 158 AutofillPopupView* AutofillPopupView::Create( |
156 AutofillPopupController* controller) { | 159 AutofillPopupController* controller) { |
157 if (IsKeyboardAccessoryEnabled()) | 160 if (IsKeyboardAccessoryEnabled()) |
158 return new AutofillKeyboardAccessoryView(controller); | 161 return new AutofillKeyboardAccessoryView(controller); |
159 | 162 |
160 return new AutofillPopupViewAndroid(controller); | 163 return new AutofillPopupViewAndroid(controller); |
161 } | 164 } |
162 | 165 |
163 } // namespace autofill | 166 } // namespace autofill |
OLD | NEW |