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/infobars/save_password_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/save_password_infobar.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/logging.h" | 9 #include "base/logging.h" |
10 #include "chrome/browser/android/resource_mapper.h" | 10 #include "chrome/browser/android/resource_mapper.h" |
11 #include "jni/SavePasswordInfoBarDelegate_jni.h" | 11 #include "jni/SavePasswordInfoBarDelegate_jni.h" |
12 | 12 |
13 // SavePasswordInfoBarDelegate------------------------------------------------- | 13 // SavePasswordInfoBarDelegate------------------------------------------------- |
14 | 14 |
15 // static | 15 // static |
16 scoped_ptr<InfoBar> SavePasswordInfoBarDelegate::CreateInfoBar( | 16 scoped_ptr<infobars::InfoBar> SavePasswordInfoBarDelegate::CreateInfoBar( |
17 scoped_ptr<SavePasswordInfoBarDelegate> delegate) { | 17 scoped_ptr<SavePasswordInfoBarDelegate> delegate) { |
18 return scoped_ptr<InfoBar>(new SavePasswordInfoBar(delegate.Pass())); | 18 return scoped_ptr<infobars::InfoBar>( |
| 19 new SavePasswordInfoBar(delegate.Pass())); |
19 } | 20 } |
20 | 21 |
21 // SavePasswordInfoBar -------------------------------------------------------- | 22 // SavePasswordInfoBar -------------------------------------------------------- |
22 | 23 |
23 SavePasswordInfoBar::SavePasswordInfoBar( | 24 SavePasswordInfoBar::SavePasswordInfoBar( |
24 scoped_ptr<SavePasswordInfoBarDelegate> delegate) | 25 scoped_ptr<SavePasswordInfoBarDelegate> delegate) |
25 : ConfirmInfoBar(delegate.PassAs<ConfirmInfoBarDelegate>()), | 26 : ConfirmInfoBar(delegate.PassAs<ConfirmInfoBarDelegate>()), |
26 java_save_password_delegate_() { | 27 java_save_password_delegate_() { |
27 } | 28 } |
28 | 29 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 SavePasswordInfoBarDelegate* SavePasswordInfoBar::GetDelegate() { | 67 SavePasswordInfoBarDelegate* SavePasswordInfoBar::GetDelegate() { |
67 return static_cast<SavePasswordInfoBarDelegate*>(delegate()); | 68 return static_cast<SavePasswordInfoBarDelegate*>(delegate()); |
68 } | 69 } |
69 | 70 |
70 | 71 |
71 // Native JNI methods --------------------------------------------------------- | 72 // Native JNI methods --------------------------------------------------------- |
72 | 73 |
73 bool RegisterSavePasswordInfoBar(JNIEnv* env) { | 74 bool RegisterSavePasswordInfoBar(JNIEnv* env) { |
74 return RegisterNativesImpl(env); | 75 return RegisterNativesImpl(env); |
75 } | 76 } |
OLD | NEW |