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

Unified Diff: headless/lib/browser/headless_browser_impl.cc

Issue 2709433002: Add HeadlessFocusClient to fix document.hasFocus() issues. (Closed)
Patch Set: Set FocusClient and add test Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: headless/lib/browser/headless_browser_impl.cc
diff --git a/headless/lib/browser/headless_browser_impl.cc b/headless/lib/browser/headless_browser_impl.cc
index e0546b174fa1deaefa8462946423e31578196861..402477b94ff8a1193d9409724bb2704e2f5bac9a 100644
--- a/headless/lib/browser/headless_browser_impl.cc
+++ b/headless/lib/browser/headless_browser_impl.cc
@@ -20,6 +20,7 @@
#include "headless/lib/browser/headless_web_contents_impl.h"
#include "headless/lib/headless_content_main_delegate.h"
#include "ui/aura/env.h"
+#include "ui/aura/test/test_focus_client.h"
#include "ui/aura/window.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/gfx/geometry/size.h"
@@ -49,7 +50,8 @@ int RunContentMain(
HeadlessBrowserImpl::HeadlessBrowserImpl(
const base::Callback<void(HeadlessBrowser*)>& on_start_callback,
HeadlessBrowser::Options options)
- : on_start_callback_(on_start_callback),
+ : focus_client_(new aura::test::TestFocusClient()),
Eric Seckler 2017/02/22 09:00:04 Let's get rid of the init here, since you reset it
irisu 2017/02/23 00:02:26 Done.
+ on_start_callback_(on_start_callback),
options_(std::move(options)),
browser_main_parts_(nullptr),
default_browser_context_(nullptr),

Powered by Google App Engine
This is Rietveld 408576698