Chromium Code Reviews| Index: headless/lib/browser/headless_web_contents_impl.cc |
| diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc |
| index 9d4b7add3323b2db989e49f990c62d79346bf0ae..bd38f77532b21715cc3fd6cc975c402574bbcc1f 100644 |
| --- a/headless/lib/browser/headless_web_contents_impl.cc |
| +++ b/headless/lib/browser/headless_web_contents_impl.cc |
| @@ -21,6 +21,8 @@ |
| #include "content/public/browser/render_frame_host.h" |
| #include "content/public/browser/render_process_host.h" |
| #include "content/public/browser/render_view_host.h" |
| +#include "content/public/browser/render_widget_host.h" |
| +#include "content/public/browser/render_widget_host_view.h" |
|
Eric Seckler
2017/02/22 09:00:04
nit: do we still need this include?
irisu
2017/02/23 00:02:26
Done.
|
| #include "content/public/browser/web_contents.h" |
| #include "content/public/browser/web_contents_delegate.h" |
| #include "content/public/common/bindings_policy.h" |
| @@ -97,6 +99,10 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { |
| security_style_explanations); |
| } |
| + void ActivateContents(content::WebContents* contents) override { |
| + contents->GetRenderViewHost()->GetWidget()->Focus(); |
| + } |
| + |
| private: |
| HeadlessBrowserContextImpl* browser_context_; // Not owned. |
| DISALLOW_COPY_AND_ASSIGN(Delegate); |