Index: components/autofill/content/browser/content_autofill_driver.cc |
diff --git a/components/autofill/content/browser/content_autofill_driver.cc b/components/autofill/content/browser/content_autofill_driver.cc |
index 992b862ffae0b38afbfe7e9fa220565ee9ff5a2b..b59d12f92626a96ffd6ca7fe5aaa766556a1b687 100644 |
--- a/components/autofill/content/browser/content_autofill_driver.cc |
+++ b/components/autofill/content/browser/content_autofill_driver.cc |
@@ -19,6 +19,7 @@ |
#include "content/public/browser/render_frame_host.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/site_instance.h" |
+#include "content/public/browser/web_contents.h" |
#include "ipc/ipc_message_macros.h" |
namespace autofill { |
@@ -145,6 +146,12 @@ void ContentAutofillDriver::RendererShouldPreviewFieldWithValue( |
render_frame_host_->GetRoutingID(), value)); |
} |
+void ContentAutofillDriver::LinkClicked(const GURL& url, |
+ WindowOpenDisposition disposition) { |
+ GetWebContents()->OpenURL(content::OpenURLParams( |
Peter Kasting
2014/12/29 22:24:30
If this is the only use of GetWebContents(), then
Pritam Nikam
2014/12/30 13:22:13
Done.
|
+ url, content::Referrer(), disposition, ui::PAGE_TRANSITION_LINK, false)); |
+} |
+ |
bool ContentAutofillDriver::HandleMessage(const IPC::Message& message) { |
bool handled = true; |
IPC_BEGIN_MESSAGE_MAP(ContentAutofillDriver, message) |
@@ -204,4 +211,8 @@ void ContentAutofillDriver::SetAutofillManager( |
autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); |
} |
+content::WebContents* ContentAutofillDriver::GetWebContents() { |
+ return content::WebContents::FromRenderFrameHost(render_frame_host_); |
+} |
+ |
} // namespace autofill |