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/generated_password_saved_infobar.h" | 5 #include "chrome/browser/ui/android/infobars/generated_password_saved_infobar.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
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" |
11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
12 #include "chrome/browser/infobars/infobar_service.h" | 12 #include "chrome/browser/infobars/infobar_service.h" |
13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
14 #include "jni/GeneratedPasswordSavedInfoBarDelegate_jni.h" | 14 #include "jni/GeneratedPasswordSavedInfoBarDelegate_jni.h" |
15 | 15 |
| 16 using base::android::JavaParamRef; |
| 17 |
16 // static | 18 // static |
17 void GeneratedPasswordSavedInfoBarDelegateAndroid::Create( | 19 void GeneratedPasswordSavedInfoBarDelegateAndroid::Create( |
18 content::WebContents* web_contents) { | 20 content::WebContents* web_contents) { |
19 InfoBarService::FromWebContents(web_contents) | 21 InfoBarService::FromWebContents(web_contents) |
20 ->AddInfoBar(base::WrapUnique(new GeneratedPasswordSavedInfoBar( | 22 ->AddInfoBar(base::WrapUnique(new GeneratedPasswordSavedInfoBar( |
21 base::WrapUnique(new GeneratedPasswordSavedInfoBarDelegateAndroid( | 23 base::WrapUnique(new GeneratedPasswordSavedInfoBarDelegateAndroid( |
22 web_contents))))); | 24 web_contents))))); |
23 } | 25 } |
24 | 26 |
25 GeneratedPasswordSavedInfoBar::GeneratedPasswordSavedInfoBar( | 27 GeneratedPasswordSavedInfoBar::GeneratedPasswordSavedInfoBar( |
(...skipping 28 matching lines...) Expand all Loading... |
54 ->OnInlineLinkClicked(); | 56 ->OnInlineLinkClicked(); |
55 RemoveSelf(); | 57 RemoveSelf(); |
56 } | 58 } |
57 | 59 |
58 void GeneratedPasswordSavedInfoBar::ProcessButton(int action) { | 60 void GeneratedPasswordSavedInfoBar::ProcessButton(int action) { |
59 if (!owner()) | 61 if (!owner()) |
60 return; | 62 return; |
61 | 63 |
62 RemoveSelf(); | 64 RemoveSelf(); |
63 } | 65 } |
OLD | NEW |