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

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

Issue 2669693002: Minimize headless code that refers to aura. (Closed)
Patch Set: Add aura dependencies in BUIL.gn only when use_aura == true" 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_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 c01545c9c35fc4e4c395c0281ce679c96e4c113a..ea2f33762e30c0773e8cae1e65861eed684ce5b3 100644
--- a/headless/lib/browser/headless_window_tree_host.h
+++ b/headless/lib/browser/headless_window_tree_host.h
@@ -5,7 +5,10 @@
#ifndef HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
#define HEADLESS_LIB_BROWSER_HEADLESS_WINDOW_TREE_HOST_H_
+#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"
@@ -18,6 +21,10 @@ class HeadlessWindowTreeHost : public aura::WindowTreeHost,
explicit HeadlessWindowTreeHost(const gfx::Rect& bounds);
~HeadlessWindowTreeHost() override;
+ gfx::NativeWindow NativeWindow();
Sami 2017/02/09 18:08:22 Not sure why we can't just use window()? This file
dvallet 2017/02/10 05:12:21 You are right, this came from an old refractoring.
+ void SetParentWindow(gfx::NativeWindow window);
+ gfx::NativeWindow GetTopWindowContainingPoint(const gfx::Point& point);
+
// ui::PlatformEventDispatcher:
bool CanDispatchEvent(const ui::PlatformEvent& event) override;
uint32_t DispatchEvent(const ui::PlatformEvent& event) override;
@@ -39,6 +46,7 @@ class HeadlessWindowTreeHost : public aura::WindowTreeHost,
private:
gfx::Rect bounds_;
+ std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
DISALLOW_COPY_AND_ASSIGN(HeadlessWindowTreeHost);
};

Powered by Google App Engine
This is Rietveld 408576698