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

Side by Side Diff: components/autofill/content/renderer/provisionally_saved_password_form.h

Issue 2865233003: Use an MutationObserver to check when a password form disappears after XHR (Closed)
Patch Set: tests Created 3 years, 7 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FORM_H _ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FORM_H _
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FORM_H _ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FORM_H _
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 20 matching lines...) Expand all
31 // password data may be invalid (e.g. empty username or password). 31 // password data may be invalid (e.g. empty username or password).
32 bool IsSet() const; 32 bool IsSet() const;
33 // Returns true if |password_form_| has enough information that it is likely 33 // Returns true if |password_form_| has enough information that it is likely
34 // filled out. 34 // filled out.
35 bool IsPasswordValid() const; 35 bool IsPasswordValid() const;
36 36
37 const PasswordForm& password_form() const { 37 const PasswordForm& password_form() const {
38 DCHECK(IsSet()); 38 DCHECK(IsSet());
39 return *password_form_; 39 return *password_form_;
40 } 40 }
41 const blink::WebFormElement& form_element() const { return form_element_; } 41 blink::WebFormElement& form_element() { return form_element_; }
42 const blink::WebInputElement& input_element() const { return input_element_; } 42 blink::WebInputElement& input_element() { return input_element_; }
43 43
44 private: 44 private:
45 std::unique_ptr<PasswordForm> password_form_; 45 std::unique_ptr<PasswordForm> password_form_;
46 // Last used WebFormElement for the PasswordForm submission. Can be null if 46 // Last used WebFormElement for the PasswordForm submission. Can be null if
47 // the form is unowned. 47 // the form is unowned.
48 blink::WebFormElement form_element_; 48 blink::WebFormElement form_element_;
49 // Last used WebInputElement which led to the PasswordForm update. Can be null 49 // Last used WebInputElement which led to the PasswordForm update. Can be null
50 // if the user has performed a form submission (via a button, for example). 50 // if the user has performed a form submission (via a button, for example).
51 blink::WebInputElement input_element_; 51 blink::WebInputElement input_element_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(ProvisionallySavedPasswordForm); 53 DISALLOW_COPY_AND_ASSIGN(ProvisionallySavedPasswordForm);
54 }; 54 };
55 55
56 } // namespace autofill 56 } // namespace autofill
57 57
58 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FOR M_H_ 58 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FOR M_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698