| Index: components/autofill/content/browser/autofill_driver_impl.cc
|
| diff --git a/components/autofill/content/browser/autofill_driver_impl.cc b/components/autofill/content/browser/autofill_driver_impl.cc
|
| index 713bee7d4c7dfe7e3b245a98f077f50f89b644cd..2cc9c25567cc6e8d0589306f9d5f58dad90a7d76 100644
|
| --- a/components/autofill/content/browser/autofill_driver_impl.cc
|
| +++ b/components/autofill/content/browser/autofill_driver_impl.cc
|
| @@ -13,6 +13,7 @@
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_source.h"
|
| #include "content/public/browser/notification_types.h"
|
| +#include "content/public/browser/render_view_host.h"
|
| #include "content/public/browser/web_contents.h"
|
| #include "content/public/common/frame_navigate_params.h"
|
| #include "ipc/ipc_message_macros.h"
|
| @@ -81,6 +82,19 @@ content::WebContents* AutofillDriverImpl::GetWebContents() {
|
| return web_contents();
|
| }
|
|
|
| +bool AutofillDriverImpl::RendererIsAvailable() {
|
| + return (web_contents()->GetRenderViewHost() != NULL);
|
| +}
|
| +
|
| +void AutofillDriverImpl::SendFormDataToRenderer(int query_id,
|
| + const FormData& data) {
|
| + if (!RendererIsAvailable())
|
| + return;
|
| + content::RenderViewHost* host = web_contents()->GetRenderViewHost();
|
| + host->Send(
|
| + new AutofillMsg_FormDataFilled(host->GetRoutingID(), query_id, data));
|
| +}
|
| +
|
| bool AutofillDriverImpl::OnMessageReceived(const IPC::Message& message) {
|
| bool handled = true;
|
| IPC_BEGIN_MESSAGE_MAP(AutofillDriverImpl, message)
|
|
|