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

Unified Diff: headless/lib/browser/headless_window_tree_host.h

Issue 2787373002: [headless] Use individual aura::WindowTreeHosts per WebContents. (Closed)
Patch Set: Created 3 years, 9 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_window_tree_host.h
diff --git a/headless/lib/browser/headless_window_tree_host.h b/headless/lib/browser/headless_window_tree_host.h
index 0aadfc87d18c37737ea8d0e198d1611373714ce1..097435acca1ea53c86217284196ada6d3c710703 100644
--- a/headless/lib/browser/headless_window_tree_host.h
+++ b/headless/lib/browser/headless_window_tree_host.h
@@ -5,14 +5,22 @@
#ifndef HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
#define HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
+#if defined(USE_AURA)
+
#include <memory>
#include "base/macros.h"
-#include "headless/lib/browser/headless_window_parenting_client.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/platform/platform_event_dispatcher.h"
#include "ui/gfx/geometry/rect.h"
+namespace aura {
+namespace client {
+class FocusClient;
+class WindowParentingClient;
+}
+}
+
namespace headless {
class HeadlessWindowTreeHost : public aura::WindowTreeHost,
@@ -44,6 +52,7 @@ class HeadlessWindowTreeHost : public aura::WindowTreeHost,
private:
gfx::Rect bounds_;
+ std::unique_ptr<aura::client::FocusClient> focus_client_;
std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
DISALLOW_COPY_AND_ASSIGN(HeadlessWindowTreeHost);
@@ -51,4 +60,8 @@ class HeadlessWindowTreeHost : public aura::WindowTreeHost,
} // namespace headless
+#else // defined(USE_AURA)
+class HeadlessWindowTreeHost {};
+#endif // defined(USE_AURA)
+
#endif // HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_

Powered by Google App Engine
This is Rietveld 408576698