Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_PROXY_H_ | |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_PROXY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/weak_ptr.h" | |
| 10 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" | |
| 11 | |
| 12 // The class simply delegates all the calls to its delegate. It supports weak | |
| 13 // pointer ownership. | |
| 14 class PasswordsModelDelegateProxy | |
| 15 : public PasswordsModelDelegate, | |
| 16 public base::SupportsWeakPtr<PasswordsModelDelegateProxy> { | |
| 17 public: | |
| 18 explicit PasswordsModelDelegateProxy(PasswordsModelDelegate* delegate); | |
| 19 ~PasswordsModelDelegateProxy() override; | |
| 20 | |
| 21 content::WebContents* GetWebContents() const override; | |
|
sky
2016/08/03 19:42:00
Prefix with where overriden from, eg:
// Passwords
vasilii
2016/08/04 09:29:13
Done.
| |
| 22 const GURL& GetOrigin() const override; | |
| 23 password_manager::ui::State GetState() const override; | |
| 24 const autofill::PasswordForm& GetPendingPassword() const override; | |
| 25 bool IsPasswordOverridden() const override; | |
| 26 const std::vector<const autofill::PasswordForm*>& GetCurrentForms() const | |
| 27 override; | |
| 28 const std::vector<const autofill::PasswordForm*>& GetFederatedForms() const | |
| 29 override; | |
| 30 password_manager::InteractionsStats* GetCurrentInteractionStats() const | |
| 31 override; | |
| 32 void OnBubbleShown() override; | |
| 33 void OnBubbleHidden() override; | |
| 34 void OnNoInteractionOnUpdate() override; | |
| 35 void OnNopeUpdateClicked() override; | |
| 36 void NeverSavePassword() override; | |
| 37 void SavePassword() override; | |
| 38 void UpdatePassword(const autofill::PasswordForm& password_form) override; | |
| 39 void ChooseCredential( | |
| 40 const autofill::PasswordForm& form, | |
| 41 password_manager::CredentialType credential_type) override; | |
| 42 void NavigateToExternalPasswordManager() override; | |
| 43 void NavigateToSmartLockHelpPage() override; | |
| 44 void NavigateToPasswordManagerSettingsPage() override; | |
| 45 void NavigateToChromeSignIn() override; | |
| 46 void OnDialogHidden() override; | |
| 47 | |
| 48 private: | |
| 49 PasswordsModelDelegate* delegate_; | |
| 50 | |
| 51 DISALLOW_COPY_AND_ASSIGN(PasswordsModelDelegateProxy); | |
| 52 }; | |
| 53 | |
| 54 // Returns a proxy delegate instance for |contents|. The instance can be | |
| 55 // destroyed by ManagePasswordsUIController. | |
| 56 base::WeakPtr<PasswordsModelDelegateProxy> | |
| 57 PasswordsModelDelegateProxyFromWebContents(content::WebContents* web_contents); | |
| 58 | |
| 59 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_PROXY_H_ | |
| OLD | NEW |