Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID _H_ | |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDROID _H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/strings/string16.h" | |
|
vabr (Chromium)
2015/02/04 08:43:07
Seems unused.
melandory
2015/02/04 15:58:49
Done.
| |
| 10 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | |
| 11 #include "components/infobars/core/infobar_delegate.h" | |
| 12 #include "ui/gfx/range/range.h" | |
|
vabr (Chromium)
2015/02/04 08:43:07
Also seems unused.
melandory
2015/02/04 15:58:50
Done.
| |
| 13 | |
| 14 namespace content { | |
| 15 class WebContents; | |
| 16 } | |
| 17 | |
| 18 namespace password_manager { | |
| 19 enum class CredentialType : unsigned int; | |
| 20 } | |
| 21 | |
| 22 // Android-only infobar to notify that the generated password was saved. | |
| 23 class AccountChooserInfoBarDelegateAndroid : public infobars::InfoBarDelegate { | |
| 24 public: | |
| 25 // Creates and shows the infobar. Implemented in the platform-specific file. | |
| 26 static void Create(content::WebContents* web_contents, | |
| 27 ManagePasswordsUIController* ui_controller); | |
| 28 | |
| 29 ~AccountChooserInfoBarDelegateAndroid() override = default; | |
| 30 | |
| 31 ScopedVector<autofill::PasswordForm>& local_credentials_forms() { | |
|
vabr (Chromium)
2015/02/04 08:43:07
Please #include base/memory/scoped_vector.h and at
vabr (Chromium)
2015/02/04 08:43:07
Please make this a const method returning a const
melandory
2015/02/04 15:58:49
Done.
melandory
2015/02/04 15:58:50
Done.
| |
| 32 return ui_controller_->local_credentials_forms(); | |
| 33 } | |
| 34 | |
| 35 void choose_credential(unsigned int credential_index, | |
| 36 password_manager::CredentialType credential_type); | |
| 37 | |
| 38 private: | |
| 39 explicit AccountChooserInfoBarDelegateAndroid( | |
| 40 ManagePasswordsUIController* ui_controller); | |
| 41 | |
| 42 // InfoBarDelegate implementation: | |
| 43 virtual Type GetInfoBarType() const override; | |
|
vabr (Chromium)
2015/02/04 08:43:07
Please drop "virtual".
See: "For clarity, use exa
melandory
2015/02/04 15:58:50
Done.
| |
| 44 AccountChooserInfoBarDelegateAndroid* AsAccountChooserInfoBarDelegateAndroid() | |
| 45 override; | |
| 46 | |
| 47 // TODO(melandory): It's look like that controller part can be separated from | |
|
vabr (Chromium)
2015/02/04 08:43:08
Grammar + shortening:
It should be possible to sep
melandory
2015/02/04 15:58:49
Done.
| |
| 48 // ManagePasswordsUIController, because it looks like it doing some desktop ui | |
| 49 // work. | |
| 50 ManagePasswordsUIController* ui_controller_; | |
|
vabr (Chromium)
2015/02/04 08:43:07
Please note whether this is a weak pointer, or whe
melandory
2015/02/04 15:58:50
Done.
| |
| 51 | |
| 52 DISALLOW_COPY_AND_ASSIGN(AccountChooserInfoBarDelegateAndroid); | |
| 53 }; | |
| 54 | |
| 55 #endif // CHROME_BROWSER_PASSWORD_MANAGER_ACCOUNT_CHOOSER_INFOBAR_DELEGATE_ANDR OID_H_ | |
| OLD | NEW |