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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 = controller_->container_view(); |
57 | 57 |
58 DCHECK(view_android); | 58 DCHECK(view_android); |
59 | 59 |
60 java_object_.Reset(Java_PasswordGenerationPopupBridge_create( | 60 java_object_.Reset(Java_PasswordGenerationPopupBridge_create( |
61 env, | 61 env, |
62 reinterpret_cast<intptr_t>(this), | 62 reinterpret_cast<intptr_t>(this), |
63 view_android->GetWindowAndroid()->GetJavaObject().obj(), | 63 view_android->GetWindowAndroid()->GetJavaObject().obj(), |
64 view_android->GetJavaObject().obj())); | 64 view_android->GetViewAndroidDelegate().obj())); |
65 | 65 |
66 UpdateBoundsAndRedrawPopup(); | 66 UpdateBoundsAndRedrawPopup(); |
67 } | 67 } |
68 | 68 |
69 void PasswordGenerationPopupViewAndroid::Hide() { | 69 void PasswordGenerationPopupViewAndroid::Hide() { |
70 controller_ = NULL; | 70 controller_ = NULL; |
71 JNIEnv* env = base::android::AttachCurrentThread(); | 71 JNIEnv* env = base::android::AttachCurrentThread(); |
72 Java_PasswordGenerationPopupBridge_hide(env, java_object_.obj()); | 72 Java_PasswordGenerationPopupBridge_hide(env, java_object_.obj()); |
73 } | 73 } |
74 | 74 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 return false; | 115 return false; |
116 } | 116 } |
117 | 117 |
118 // static | 118 // static |
119 PasswordGenerationPopupView* PasswordGenerationPopupView::Create( | 119 PasswordGenerationPopupView* PasswordGenerationPopupView::Create( |
120 PasswordGenerationPopupController* controller) { | 120 PasswordGenerationPopupController* controller) { |
121 return new PasswordGenerationPopupViewAndroid(controller); | 121 return new PasswordGenerationPopupViewAndroid(controller); |
122 } | 122 } |
123 | 123 |
124 } // namespace autofill | 124 } // namespace autofill |
OLD | NEW |