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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "components/password_manager/content/browser/content_password_manager_d
river.h" | 10 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 content::WebContents* contents); | 70 content::WebContents* contents); |
71 | 71 |
72 // Convenience method to allow //chrome code easy access to a | 72 // Convenience method to allow //chrome code easy access to a |
73 // PasswordGenerationManager from a WebContents instance. | 73 // PasswordGenerationManager from a WebContents instance. |
74 static password_manager::PasswordGenerationManager* | 74 static password_manager::PasswordGenerationManager* |
75 GetGenerationManagerFromWebContents(content::WebContents* contents); | 75 GetGenerationManagerFromWebContents(content::WebContents* contents); |
76 | 76 |
77 // Observer for PasswordGenerationPopup events. Used for testing. | 77 // Observer for PasswordGenerationPopup events. Used for testing. |
78 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); | 78 void SetTestObserver(autofill::PasswordGenerationPopupObserver* observer); |
79 | 79 |
| 80 // Returns true if the bubble UI is enabled, and false if we're still using |
| 81 // the sad old Infobar UI. |
| 82 static bool IsTheHotNewBubbleUIEnabled(); |
| 83 |
80 private: | 84 private: |
81 ChromePasswordManagerClient(content::WebContents* web_contents, | 85 ChromePasswordManagerClient(content::WebContents* web_contents, |
82 autofill::AutofillClient* autofill_client); | 86 autofill::AutofillClient* autofill_client); |
83 friend class content::WebContentsUserData<ChromePasswordManagerClient>; | 87 friend class content::WebContentsUserData<ChromePasswordManagerClient>; |
84 | 88 |
85 // content::WebContentsObserver overrides. | 89 // content::WebContentsObserver overrides. |
86 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 90 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
87 | 91 |
88 // Callback method to be triggered when authentication is successful for a | 92 // Callback method to be triggered when authentication is successful for a |
89 // given password authentication request. If authentication is disabled or | 93 // given password authentication request. If authentication is disabled or |
(...skipping 29 matching lines...) Expand all Loading... |
119 // Allows authentication callbacks to be destroyed when this client is gone. | 123 // Allows authentication callbacks to be destroyed when this client is gone. |
120 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; | 124 base::WeakPtrFactory<ChromePasswordManagerClient> weak_factory_; |
121 | 125 |
122 // True if |this| is registered with some LogRouter which can accept logs. | 126 // True if |this| is registered with some LogRouter which can accept logs. |
123 bool can_use_log_router_; | 127 bool can_use_log_router_; |
124 | 128 |
125 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); | 129 DISALLOW_COPY_AND_ASSIGN(ChromePasswordManagerClient); |
126 }; | 130 }; |
127 | 131 |
128 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ | 132 #endif // CHROME_BROWSER_PASSWORD_MANAGER_CHROME_PASSWORD_MANAGER_CLIENT_H_ |
OLD | NEW |