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

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

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 #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"
(...skipping 14 matching lines...) Expand all
25 25
26 AutofillPopupViewAndroid::AutofillPopupViewAndroid( 26 AutofillPopupViewAndroid::AutofillPopupViewAndroid(
27 AutofillPopupController* controller) 27 AutofillPopupController* controller)
28 : controller_(controller), 28 : controller_(controller),
29 deleting_index_(-1) {} 29 deleting_index_(-1) {}
30 30
31 AutofillPopupViewAndroid::~AutofillPopupViewAndroid() {} 31 AutofillPopupViewAndroid::~AutofillPopupViewAndroid() {}
32 32
33 void AutofillPopupViewAndroid::Show() { 33 void AutofillPopupViewAndroid::Show() {
34 JNIEnv* env = base::android::AttachCurrentThread(); 34 JNIEnv* env = base::android::AttachCurrentThread();
35 ui::ViewAndroid* view_android = controller_->container_view(); 35 ui::ViewAndroid* view_android =
36 (ui::ViewAndroid*) controller_->container_view();
36 37
37 DCHECK(view_android); 38 DCHECK(view_android);
38 39
39 java_object_.Reset(Java_AutofillPopupBridge_create( 40 java_object_.Reset(Java_AutofillPopupBridge_create(
40 env, reinterpret_cast<intptr_t>(this), 41 env, reinterpret_cast<intptr_t>(this),
41 view_android->GetWindowAndroid()->GetJavaObject().obj(), 42 view_android->GetWindowAndroid()->GetJavaObject().obj(),
42 view_android->GetViewAndroidDelegate().obj())); 43 view_android->GetViewAndroidDelegate().obj()));
43 44
44 UpdateBoundsAndRedrawPopup(); 45 UpdateBoundsAndRedrawPopup();
45 } 46 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 AutofillPopupController* controller) { 154 AutofillPopupController* controller) {
154 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 155 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
155 switches::kEnableAccessorySuggestionView)) { 156 switches::kEnableAccessorySuggestionView)) {
156 return new AutofillKeyboardAccessoryView(controller); 157 return new AutofillKeyboardAccessoryView(controller);
157 } 158 }
158 159
159 return new AutofillPopupViewAndroid(controller); 160 return new AutofillPopupViewAndroid(controller);
160 } 161 }
161 162
162 } // namespace autofill 163 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698