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 "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" |
10 #include "chrome/browser/ui/android/window_android_helper.h" | 12 #include "chrome/browser/ui/android/window_android_helper.h" |
11 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" | 13 #include "chrome/browser/ui/autofill/autofill_popup_controller.h" |
12 #include "components/autofill/core/browser/suggestion.h" | 14 #include "components/autofill/core/browser/suggestion.h" |
| 15 #include "components/autofill/core/common/autofill_switches.h" |
13 #include "content/public/browser/android/content_view_core.h" | 16 #include "content/public/browser/android/content_view_core.h" |
14 #include "jni/AutofillPopupBridge_jni.h" | 17 #include "jni/AutofillPopupBridge_jni.h" |
15 #include "ui/android/view_android.h" | 18 #include "ui/android/view_android.h" |
16 #include "ui/android/window_android.h" | 19 #include "ui/android/window_android.h" |
17 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
18 #include "ui/gfx/android/java_bitmap.h" | 21 #include "ui/gfx/android/java_bitmap.h" |
19 #include "ui/gfx/geometry/rect.h" | 22 #include "ui/gfx/geometry/rect.h" |
20 | 23 |
21 namespace autofill { | 24 namespace autofill { |
22 | 25 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 void AutofillPopupViewAndroid::InvalidateRow(size_t) {} | 109 void AutofillPopupViewAndroid::InvalidateRow(size_t) {} |
107 | 110 |
108 // static | 111 // static |
109 bool AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid(JNIEnv* env) { | 112 bool AutofillPopupViewAndroid::RegisterAutofillPopupViewAndroid(JNIEnv* env) { |
110 return RegisterNativesImpl(env); | 113 return RegisterNativesImpl(env); |
111 } | 114 } |
112 | 115 |
113 // static | 116 // static |
114 AutofillPopupView* AutofillPopupView::Create( | 117 AutofillPopupView* AutofillPopupView::Create( |
115 AutofillPopupController* controller) { | 118 AutofillPopupController* controller) { |
| 119 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 120 switches::kEnableAccessorySuggestionView)) { |
| 121 return new AutofillKeyboardAccessoryView(controller); |
| 122 } |
| 123 |
116 return new AutofillPopupViewAndroid(controller); | 124 return new AutofillPopupViewAndroid(controller); |
117 } | 125 } |
118 | 126 |
119 } // namespace autofill | 127 } // namespace autofill |
OLD | NEW |