Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / components / autofill / content / common / autofill_messages.h
index 9b01b5d..fde4a9f 100644 (file)
@@ -5,7 +5,9 @@
 // Multiply-included message file, hence no include guard.
 
 #include <string>
+#include <vector>
 
+#include "base/strings/string16.h"
 #include "base/time/time.h"
 #include "components/autofill/content/common/autofill_param_traits_macros.h"
 #include "components/autofill/core/common/form_data.h"
@@ -22,6 +24,7 @@
 #include "ipc/ipc_message_utils.h"
 #include "third_party/WebKit/public/web/WebFormElement.h"
 #include "ui/gfx/rect.h"
+#include "url/gurl.h"
 
 #define IPC_MESSAGE_START AutofillMsgStart
 
@@ -110,6 +113,10 @@ IPC_MESSAGE_ROUTED2(AutofillMsg_PreviewForm,
 IPC_MESSAGE_ROUTED1(AutofillMsg_FillPasswordForm,
                     autofill::PasswordFormFillData /* the fill form data*/)
 
+// Notification to start (|active| == true) or stop (|active| == false) logging
+// the decisions made about saving the password.
+IPC_MESSAGE_ROUTED1(AutofillMsg_ChangeLoggingState, bool /* active */)
+
 // Send the heuristic and server field type predictions to the renderer.
 IPC_MESSAGE_ROUTED1(
     AutofillMsg_FieldTypePredictionsAvailable,
@@ -138,9 +145,11 @@ IPC_MESSAGE_ROUTED1(AutofillMsg_AcceptDataListSuggestion,
 IPC_MESSAGE_ROUTED1(AutofillMsg_GeneratedPasswordAccepted,
                     base::string16 /* generated_password */)
 
-// Tells the renderer that the password field has accept the suggestion.
-IPC_MESSAGE_ROUTED1(AutofillMsg_AcceptPasswordAutofillSuggestion,
-                    base::string16 /* username value*/)
+// Tells the renderer that the user accepted a password autofill suggestion,
+// and that renderer should set the username and password to the given values.
+IPC_MESSAGE_ROUTED2(AutofillMsg_AcceptPasswordAutofillSuggestion,
+                    base::string16 /* username */,
+                    base::string16 /* password */)
 
 // Tells the renderer that this password form is not blacklisted.  A form can
 // be blacklisted if a user chooses "never save passwords for this site".
@@ -149,9 +158,11 @@ IPC_MESSAGE_ROUTED1(AutofillMsg_FormNotBlacklisted,
 
 // Sent when requestAutocomplete() finishes (either succesfully or with an
 // error). If it was a success, the renderer fills the form that requested
-// autocomplete with the |form_data| values input by the user.
-IPC_MESSAGE_ROUTED2(AutofillMsg_RequestAutocompleteResult,
+// autocomplete with the |form_data| values input by the user. |message|
+// is printed to the console if non-empty.
+IPC_MESSAGE_ROUTED3(AutofillMsg_RequestAutocompleteResult,
                     blink::WebFormElement::AutocompleteResult /* result */,
+                    base::string16 /* message */,
                     autofill::FormData /* form_data */)
 
 // Sent when Autofill manager gets the query response from the Autofill server
@@ -185,6 +196,13 @@ IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormsRendered,
 IPC_MESSAGE_ROUTED1(AutofillHostMsg_PasswordFormSubmitted,
                     autofill::PasswordForm /* form */)
 
+// Sends |log| to browser for displaying to the user. Only strings passed as an
+// argument to methods overriding SavePasswordProgressLogger::SendLog may become
+// |log|, because those are guaranteed to be sanitized. Never pass a free-form
+// string as |log|.
+IPC_MESSAGE_ROUTED1(AutofillHostMsg_RecordSavePasswordProgress,
+                    std::string /* log */)
+
 // Notification that a form has been submitted.  The user hit the button.
 IPC_MESSAGE_ROUTED2(AutofillHostMsg_FormSubmitted,
                     autofill::FormData /* form */,