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

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

Issue 2709433002: Add HeadlessFocusClient to fix document.hasFocus() issues. (Closed)
Patch Set: Remove unnecessary imports 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
« no previous file with comments | « headless/lib/browser/headless_browser_impl.cc ('k') | headless/lib/browser/headless_focus_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: headless/lib/browser/headless_browser_impl_aura.cc
diff --git a/headless/lib/browser/headless_browser_impl_aura.cc b/headless/lib/browser/headless_browser_impl_aura.cc
index 9237e347112052370d506943b67c40ee6c92cf23..4718d4914dcae1947b391ec541367877dd946698 100644
--- a/headless/lib/browser/headless_browser_impl_aura.cc
+++ b/headless/lib/browser/headless_browser_impl_aura.cc
@@ -6,7 +6,9 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
+#include "headless/lib/browser/headless_focus_client.h"
#include "headless/lib/browser/headless_screen.h"
+#include "ui/aura/client/focus_client.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
#include "ui/display/screen.h"
@@ -29,6 +31,10 @@ void HeadlessBrowserImpl::PlatformCreateWindow() {
window_tree_host_->InitHost();
window_tree_host_->window()->Show();
window_tree_host_->SetParentWindow(window_tree_host_->window());
+
+ focus_client_.reset(new HeadlessFocusClient());
+ aura::client::SetFocusClient(window_tree_host_->window(),
+ focus_client_.get());
}
void HeadlessBrowserImpl::PlatformInitializeWebContents(
« no previous file with comments | « headless/lib/browser/headless_browser_impl.cc ('k') | headless/lib/browser/headless_focus_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698