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

Unified Diff: headless/lib/browser/headless_browser_impl.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_browser_impl.h
diff --git a/headless/lib/browser/headless_browser_impl.h b/headless/lib/browser/headless_browser_impl.h
index f37dff1dbc45b8c135fde8db85f6f33f53ff0160..014f9d6788201d46f1b2c688de222a02205db0ee 100644
--- a/headless/lib/browser/headless_browser_impl.h
+++ b/headless/lib/browser/headless_browser_impl.h
@@ -13,16 +13,10 @@
#include <vector>
#include "base/memory/weak_ptr.h"
+#include "content/public/browser/web_contents.h"
#include "headless/lib/browser/headless_devtools_manager_delegate.h"
#include "headless/lib/browser/headless_web_contents_impl.h"
-
-namespace aura {
-class WindowTreeHost;
-
-namespace client {
-class WindowParentingClient;
-}
-}
+#include "headless/lib/browser/headless_window_tree_host.h"
Eric Seckler 2017/02/09 18:29:39 This reflects what Sami mentioned in headless_wind
dvallet 2017/02/10 05:12:20 Done, I've added #if defined(USE_AURA) directives,
namespace headless {
@@ -70,7 +64,15 @@ class HeadlessBrowserImpl : public HeadlessBrowser {
base::WeakPtr<HeadlessBrowserImpl> GetWeakPtr();
- aura::WindowTreeHost* window_tree_host() const;
+ // All the methods that begin with Platform need to be implemented by the
+ // platform specific headless implementation.
+ // Helper for one time initialization of application
+ void PlatformInitialize();
+ void PlatformCreateWindow();
+ void PlatformSetContents(const gfx::Size& initial_size,
Sami 2017/02/09 18:08:22 nit: PlatformSetWebContents since that's what the
dvallet 2017/02/10 05:12:20 Done
+ content::WebContents* web_contents);
+
+ HeadlessWindowTreeHost* window_tree_host() const;
protected:
base::Callback<void(HeadlessBrowser*)> on_start_callback_;
@@ -80,8 +82,7 @@ class HeadlessBrowserImpl : public HeadlessBrowser {
// TODO(eseckler): Currently one window and one window_tree_host
// is used for all web contents. We should probably use one
// window per web contents, but additional investigation is needed.
- std::unique_ptr<aura::WindowTreeHost> window_tree_host_;
- std::unique_ptr<aura::client::WindowParentingClient> window_parenting_client_;
+ std::unique_ptr<HeadlessWindowTreeHost> window_tree_host_;
std::unordered_map<std::string, std::unique_ptr<HeadlessBrowserContextImpl>>
browser_contexts_;

Powered by Google App Engine
This is Rietveld 408576698