OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/password_generation_popup_view_andr
oid.h" | 5 #include "chrome/browser/ui/android/autofill/password_generation_popup_view_andr
oid.h" |
6 | 6 |
7 #include <jni.h> | 7 #include <jni.h> |
8 | 8 |
9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
10 #include "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // static | 47 // static |
48 bool PasswordGenerationPopupViewAndroid::Register(JNIEnv* env) { | 48 bool PasswordGenerationPopupViewAndroid::Register(JNIEnv* env) { |
49 return RegisterNativesImpl(env); | 49 return RegisterNativesImpl(env); |
50 } | 50 } |
51 | 51 |
52 PasswordGenerationPopupViewAndroid::~PasswordGenerationPopupViewAndroid() {} | 52 PasswordGenerationPopupViewAndroid::~PasswordGenerationPopupViewAndroid() {} |
53 | 53 |
54 void PasswordGenerationPopupViewAndroid::Show() { | 54 void PasswordGenerationPopupViewAndroid::Show() { |
55 JNIEnv* env = base::android::AttachCurrentThread(); | 55 JNIEnv* env = base::android::AttachCurrentThread(); |
56 ui::ViewAndroid* view_android = controller_->container_view(); | 56 ui::ViewAndroid* view_android = |
| 57 (ui::ViewAndroid*) controller_->container_view(); |
57 | 58 |
58 DCHECK(view_android); | 59 DCHECK(view_android); |
59 | 60 |
60 java_object_.Reset(Java_PasswordGenerationPopupBridge_create( | 61 java_object_.Reset(Java_PasswordGenerationPopupBridge_create( |
61 env, reinterpret_cast<intptr_t>(this), | 62 env, reinterpret_cast<intptr_t>(this), |
62 view_android->GetWindowAndroid()->GetJavaObject().obj(), | 63 view_android->GetWindowAndroid()->GetJavaObject().obj(), |
63 view_android->GetViewAndroidDelegate().obj())); | 64 view_android->GetViewAndroidDelegate().obj())); |
64 | 65 |
65 UpdateBoundsAndRedrawPopup(); | 66 UpdateBoundsAndRedrawPopup(); |
66 } | 67 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 return false; | 115 return false; |
115 } | 116 } |
116 | 117 |
117 // static | 118 // static |
118 PasswordGenerationPopupView* PasswordGenerationPopupView::Create( | 119 PasswordGenerationPopupView* PasswordGenerationPopupView::Create( |
119 PasswordGenerationPopupController* controller) { | 120 PasswordGenerationPopupController* controller) { |
120 return new PasswordGenerationPopupViewAndroid(controller); | 121 return new PasswordGenerationPopupViewAndroid(controller); |
121 } | 122 } |
122 | 123 |
123 } // namespace autofill | 124 } // namespace autofill |
OLD | NEW |