Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: chrome/browser/ui/passwords/passwords_model_delegate_proxy.h

Issue 2202373002: Ignore OnBubbleHidden() event when the password bubble is reopened. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 // PasswordsModelDelegate:
22 content::WebContents* GetWebContents() const override;
23 const GURL& GetOrigin() const override;
24 password_manager::ui::State GetState() const override;
25 const autofill::PasswordForm& GetPendingPassword() const override;
26 bool IsPasswordOverridden() const override;
27 const std::vector<const autofill::PasswordForm*>& GetCurrentForms() const
28 override;
29 const std::vector<const autofill::PasswordForm*>& GetFederatedForms() const
30 override;
31 password_manager::InteractionsStats* GetCurrentInteractionStats() const
32 override;
33 void OnBubbleShown() override;
34 void OnBubbleHidden() override;
35 void OnNoInteractionOnUpdate() override;
36 void OnNopeUpdateClicked() override;
37 void NeverSavePassword() override;
38 void SavePassword() override;
39 void UpdatePassword(const autofill::PasswordForm& password_form) override;
40 void ChooseCredential(
41 const autofill::PasswordForm& form,
42 password_manager::CredentialType credential_type) override;
43 void NavigateToExternalPasswordManager() override;
44 void NavigateToSmartLockHelpPage() override;
45 void NavigateToPasswordManagerSettingsPage() override;
46 void NavigateToChromeSignIn() override;
47 void OnDialogHidden() override;
48
49 private:
50 PasswordsModelDelegate* delegate_;
51
52 DISALLOW_COPY_AND_ASSIGN(PasswordsModelDelegateProxy);
53 };
54
55 // Returns a proxy delegate instance for |contents|. The instance can be
56 // destroyed by ManagePasswordsUIController.
57 base::WeakPtr<PasswordsModelDelegateProxy>
58 PasswordsModelDelegateProxyFromWebContents(content::WebContents* web_contents);
59
60 #endif // CHROME_BROWSER_UI_PASSWORDS_PASSWORDS_MODEL_DELEGATE_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698