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

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

Issue 2851173004: Eliminate bind callback that doesn't take a BindSourceInfo parameter. (Closed)
Patch Set: . 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_PASSWORD_AUTOFILL_AGENT_H_ 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 6 #define COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/autofill/content/common/autofill_agent.mojom.h" 13 #include "components/autofill/content/common/autofill_agent.mojom.h"
14 #include "components/autofill/content/common/autofill_driver.mojom.h" 14 #include "components/autofill/content/common/autofill_driver.mojom.h"
15 #include "components/autofill/content/renderer/autofill_agent.h" 15 #include "components/autofill/content/renderer/autofill_agent.h"
16 #include "components/autofill/content/renderer/password_form_conversion_utils.h" 16 #include "components/autofill/content/renderer/password_form_conversion_utils.h"
17 #include "components/autofill/content/renderer/provisionally_saved_password_form .h" 17 #include "components/autofill/content/renderer/provisionally_saved_password_form .h"
18 #include "components/autofill/core/common/form_data_predictions.h" 18 #include "components/autofill/core/common/form_data_predictions.h"
19 #include "components/autofill/core/common/password_form.h" 19 #include "components/autofill/core/common/password_form.h"
20 #include "components/autofill/core/common/password_form_field_prediction_map.h" 20 #include "components/autofill/core/common/password_form_field_prediction_map.h"
21 #include "components/autofill/core/common/password_form_fill_data.h" 21 #include "components/autofill/core/common/password_form_fill_data.h"
22 #include "content/public/renderer/render_frame_observer.h" 22 #include "content/public/renderer/render_frame_observer.h"
23 #include "content/public/renderer/render_view_observer.h" 23 #include "content/public/renderer/render_view_observer.h"
24 #include "mojo/public/cpp/bindings/binding.h" 24 #include "mojo/public/cpp/bindings/binding.h"
25 #include "services/service_manager/public/cpp/bind_source_info.h"
25 #include "third_party/WebKit/public/web/WebInputElement.h" 26 #include "third_party/WebKit/public/web/WebInputElement.h"
26 27
27 namespace blink { 28 namespace blink {
28 class WebInputElement; 29 class WebInputElement;
29 class WebSecurityOrigin; 30 class WebSecurityOrigin;
30 } 31 }
31 32
32 namespace autofill { 33 namespace autofill {
33 34
34 // Names of HTML attributes to show form and field signatures for debugging. 35 // Names of HTML attributes to show form and field signatures for debugging.
35 const char kDebugAttributeForFormSignature[] = "form_signature"; 36 const char kDebugAttributeForFormSignature[] = "form_signature";
36 const char kDebugAttributeForFieldSignature[] = "field_signature"; 37 const char kDebugAttributeForFieldSignature[] = "field_signature";
37 38
38 class RendererSavePasswordProgressLogger; 39 class RendererSavePasswordProgressLogger;
39 40
40 // This class is responsible for filling password forms. 41 // This class is responsible for filling password forms.
41 class PasswordAutofillAgent : public content::RenderFrameObserver, 42 class PasswordAutofillAgent : public content::RenderFrameObserver,
42 public mojom::PasswordAutofillAgent { 43 public mojom::PasswordAutofillAgent {
43 public: 44 public:
44 explicit PasswordAutofillAgent(content::RenderFrame* render_frame); 45 explicit PasswordAutofillAgent(content::RenderFrame* render_frame);
45 ~PasswordAutofillAgent() override; 46 ~PasswordAutofillAgent() override;
46 47
47 void BindRequest(mojom::PasswordAutofillAgentRequest request); 48 void BindRequest(const service_manager::BindSourceInfo& source_info,
49 mojom::PasswordAutofillAgentRequest request);
48 50
49 void SetAutofillAgent(AutofillAgent* autofill_agent); 51 void SetAutofillAgent(AutofillAgent* autofill_agent);
50 52
51 const mojom::PasswordManagerDriverPtr& GetPasswordManagerDriver(); 53 const mojom::PasswordManagerDriverPtr& GetPasswordManagerDriver();
52 54
53 // mojom::PasswordAutofillAgent: 55 // mojom::PasswordAutofillAgent:
54 void FillPasswordForm(int key, 56 void FillPasswordForm(int key,
55 const PasswordFormFillData& form_data) override; 57 const PasswordFormFillData& form_data) override;
56 void SetLoggingState(bool active) override; 58 void SetLoggingState(bool active) override;
57 void AutofillUsernameAndPasswordDataReceived( 59 void AutofillUsernameAndPasswordDataReceived(
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 mojom::PasswordManagerDriverPtr password_manager_driver_; 307 mojom::PasswordManagerDriverPtr password_manager_driver_;
306 308
307 mojo::Binding<mojom::PasswordAutofillAgent> binding_; 309 mojo::Binding<mojom::PasswordAutofillAgent> binding_;
308 310
309 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent); 311 DISALLOW_COPY_AND_ASSIGN(PasswordAutofillAgent);
310 }; 312 };
311 313
312 } // namespace autofill 314 } // namespace autofill
313 315
314 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_ 316 #endif // COMPONENTS_AUTOFILL_CONTENT_RENDERER_PASSWORD_AUTOFILL_AGENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698