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

Side by Side Diff: components/autofill/core/browser/autofill_driver.h

Issue 223133003: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed problems in previous patch Created 6 years, 8 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_CORE_BROWSER_AUTOFILL_DRIVER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/autofill/core/common/form_data.h" 10 #include "components/autofill/core/common/form_data.h"
11 11
12 namespace base { 12 namespace base {
13 class SequencedWorkerPool; 13 class SequencedWorkerPool;
14 } 14 }
15 15
16 namespace net { 16 namespace net {
17 class URLRequestContextGetter; 17 class URLRequestContextGetter;
18 } 18 }
19 19
20 namespace autofill { 20 namespace autofill {
21 21
22 class FormStructure; 22 class FormStructure;
23 struct PasswordForm;
23 24
24 // Interface that allows Autofill core code to interact with its driver (i.e., 25 // Interface that allows Autofill core code to interact with its driver (i.e.,
25 // obtain information from it and give information to it). A concrete 26 // obtain information from it and give information to it). A concrete
26 // implementation must be provided by the driver. 27 // implementation must be provided by the driver.
27 class AutofillDriver { 28 class AutofillDriver {
28 public: 29 public:
29 // The possible actions that the renderer can take on receiving form data. 30 // The possible actions that the renderer can take on receiving form data.
30 enum RendererFormDataAction { 31 enum RendererFormDataAction {
31 // The renderer should fill the form data. 32 // The renderer should fill the form data.
32 FORM_DATA_ACTION_FILL, 33 FORM_DATA_ACTION_FILL,
(...skipping 24 matching lines...) Expand all
57 virtual void SendFormDataToRenderer(int query_id, 58 virtual void SendFormDataToRenderer(int query_id,
58 RendererFormDataAction action, 59 RendererFormDataAction action,
59 const FormData& data) = 0; 60 const FormData& data) = 0;
60 61
61 // Sends the field type predictions specified in |forms| to the renderer. This 62 // Sends the field type predictions specified in |forms| to the renderer. This
62 // method is a no-op if the renderer is not available or the appropriate 63 // method is a no-op if the renderer is not available or the appropriate
63 // command-line flag is not set. 64 // command-line flag is not set.
64 virtual void SendAutofillTypePredictionsToRenderer( 65 virtual void SendAutofillTypePredictionsToRenderer(
65 const std::vector<FormStructure*>& forms) = 0; 66 const std::vector<FormStructure*>& forms) = 0;
66 67
68 // Remove the saved login that has the username |username_to_remove|
69 // from suggestions.
70 virtual void RemovePasswordAutofillSuggestion(
71 const base::string16& username_to_remove) = 0;
72
67 // Tells the renderer to accept data list suggestions for |value|. 73 // Tells the renderer to accept data list suggestions for |value|.
68 virtual void RendererShouldAcceptDataListSuggestion( 74 virtual void RendererShouldAcceptDataListSuggestion(
69 const base::string16& value) = 0; 75 const base::string16& value) = 0;
70 76
71 // Tells the renderer to accept the password autofill suggestion for 77 // Tells the renderer to accept the password autofill suggestion for
72 // |username|. 78 // |username|.
73 virtual void RendererShouldAcceptPasswordAutofillSuggestion( 79 virtual void RendererShouldAcceptPasswordAutofillSuggestion(
74 const base::string16& username) = 0; 80 const base::string16& username) = 0;
75 81
76 // Tells the renderer to clear the currently filled Autofill results. 82 // Tells the renderer to clear the currently filled Autofill results.
77 virtual void RendererShouldClearFilledForm() = 0; 83 virtual void RendererShouldClearFilledForm() = 0;
78 84
79 // Tells the renderer to clear the currently previewed Autofill results. 85 // Tells the renderer to clear the currently previewed Autofill results.
80 virtual void RendererShouldClearPreviewedForm() = 0; 86 virtual void RendererShouldClearPreviewedForm() = 0;
81 87
82 // Tells the renderer to set the node text. 88 // Tells the renderer to set the node text.
83 virtual void RendererShouldFillFieldWithValue( 89 virtual void RendererShouldFillFieldWithValue(
84 const base::string16& value) = 0; 90 const base::string16& value) = 0;
85 91
86 // Tells the renderer to preview the node with suggested text. 92 // Tells the renderer to preview the node with suggested text.
87 virtual void RendererShouldPreviewFieldWithValue( 93 virtual void RendererShouldPreviewFieldWithValue(
88 const base::string16& value) = 0; 94 const base::string16& value) = 0;
89 95
90 }; 96 };
91 97
92 } // namespace autofill 98 } // namespace autofill
93 99
94 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_ 100 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698