| 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_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 | 133 |
| 134 // Check if |web_contents()| is attached to some Browser. Mocked in tests. | 134 // Check if |web_contents()| is attached to some Browser. Mocked in tests. |
| 135 virtual bool HasBrowserWindow() const; | 135 virtual bool HasBrowserWindow() const; |
| 136 | 136 |
| 137 // Overwrites the client for |passwords_data_|. | 137 // Overwrites the client for |passwords_data_|. |
| 138 void set_client(password_manager::PasswordManagerClient* client) { | 138 void set_client(password_manager::PasswordManagerClient* client) { |
| 139 passwords_data_.set_client(client); | 139 passwords_data_.set_client(client); |
| 140 } | 140 } |
| 141 | 141 |
| 142 // content::WebContentsObserver: | 142 // content::WebContentsObserver: |
| 143 void DidNavigateMainFrame( | 143 void DidFinishNavigation( |
| 144 const content::LoadCommittedDetails& details, | 144 content::NavigationHandle* navigation_handle) override; |
| 145 const content::FrameNavigateParams& params) override; | |
| 146 void WasHidden() override; | 145 void WasHidden() override; |
| 147 | 146 |
| 148 private: | 147 private: |
| 149 friend class content::WebContentsUserData<ManagePasswordsUIController>; | 148 friend class content::WebContentsUserData<ManagePasswordsUIController>; |
| 150 | 149 |
| 151 enum BubbleStatus { | 150 enum BubbleStatus { |
| 152 NOT_SHOWN, | 151 NOT_SHOWN, |
| 153 // The bubble is to be popped up in the next call to | 152 // The bubble is to be popped up in the next call to |
| 154 // UpdateBubbleAndIconVisibility(). | 153 // UpdateBubbleAndIconVisibility(). |
| 155 SHOULD_POP_UP, | 154 SHOULD_POP_UP, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 184 // Thus, OnBubbleHidden() can be called after the new one is shown. By that | 183 // Thus, OnBubbleHidden() can be called after the new one is shown. By that |
| 185 // time the internal state of ManagePasswordsUIController has nothing to do | 184 // time the internal state of ManagePasswordsUIController has nothing to do |
| 186 // with the old bubble. | 185 // with the old bubble. |
| 187 // Invalidating all the weak pointers will detach the current bubble. | 186 // Invalidating all the weak pointers will detach the current bubble. |
| 188 base::WeakPtrFactory<ManagePasswordsUIController> weak_ptr_factory_; | 187 base::WeakPtrFactory<ManagePasswordsUIController> weak_ptr_factory_; |
| 189 | 188 |
| 190 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); | 189 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsUIController); |
| 191 }; | 190 }; |
| 192 | 191 |
| 193 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ | 192 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_UI_CONTROLLER_H_ |
| OLD | NEW |