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

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: updates 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 21 matching lines...) Expand all
32 // password data may be invalid (e.g. empty username or password). 32 // password data may be invalid (e.g. empty username or password).
33 bool IsSet() const; 33 bool IsSet() const;
34 // Returns true if |password_form_| has enough information that it is likely 34 // Returns true if |password_form_| has enough information that it is likely
35 // filled out. 35 // filled out.
36 bool IsPasswordValid() const; 36 bool IsPasswordValid() const;
37 37
38 const PasswordForm& password_form() const { 38 const PasswordForm& password_form() const {
39 DCHECK(IsSet()); 39 DCHECK(IsSet());
40 return *password_form_; 40 return *password_form_;
41 } 41 }
42 const blink::WebFormElement& form_element() const { return form_element_; } 42 blink::WebFormElement& form_element() { return form_element_; }
43 const blink::WebInputElement& input_element() const { return input_element_; } 43 blink::WebInputElement& input_element() { return input_element_; }
44 44
45 void SetSubmissionIndicatorEvent( 45 void SetSubmissionIndicatorEvent(
46 PasswordForm::SubmissionIndicatorEvent event); 46 PasswordForm::SubmissionIndicatorEvent event);
47 47
48 private: 48 private:
49 std::unique_ptr<PasswordForm> password_form_; 49 std::unique_ptr<PasswordForm> password_form_;
50 // Last used WebFormElement for the PasswordForm submission. Can be null if 50 // Last used WebFormElement for the PasswordForm submission. Can be null if
51 // the form is unowned. 51 // the form is unowned.
52 blink::WebFormElement form_element_; 52 blink::WebFormElement form_element_;
53 // Last used WebInputElement which led to the PasswordForm update. Can be null 53 // Last used WebInputElement which led to the PasswordForm update. Can be null
54 // if the user has performed a form submission (via a button, for example). 54 // if the user has performed a form submission (via a button, for example).
55 blink::WebInputElement input_element_; 55 blink::WebInputElement input_element_;
56 56
57 DISALLOW_COPY_AND_ASSIGN(ProvisionallySavedPasswordForm); 57 DISALLOW_COPY_AND_ASSIGN(ProvisionallySavedPasswordForm);
58 }; 58 };
59 59
60 } // namespace autofill 60 } // namespace autofill
61 61
62 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FOR M_H_ 62 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PROVISIONALLY_SAVED_PASSWORD_FOR M_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698