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

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

Issue 2669693002: Minimize headless code that refers to aura. (Closed)
Patch Set: Remove GetTopWindowContainingPoint 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..eb5af5eb4c11eb466ceccb39be336f712ad270dd 100644
--- a/headless/lib/browser/headless_browser_impl.h
+++ b/headless/lib/browser/headless_browser_impl.h
@@ -13,16 +13,13 @@
#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;
-}
-}
+#if defined(USE_AURA)
+#include "headless/lib/browser/headless_window_tree_host.h"
+#endif
namespace headless {
@@ -70,18 +67,24 @@ 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 PlatformSetWebContents(const gfx::Size& initial_size,
+ content::WebContents* web_contents);
protected:
- base::Callback<void(HeadlessBrowser*)> on_start_callback_;
- HeadlessBrowser::Options options_;
- HeadlessBrowserMainParts* browser_main_parts_; // Not owned.
-
+#if defined(USE_AURA)
// 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_;
+#endif
+ base::Callback<void(HeadlessBrowser*)> on_start_callback_;
+ HeadlessBrowser::Options options_;
+ HeadlessBrowserMainParts* browser_main_parts_; // Not owned.
std::unordered_map<std::string, std::unique_ptr<HeadlessBrowserContextImpl>>
browser_contexts_;
« no previous file with comments | « headless/lib/browser/headless_browser_context_impl.cc ('k') | headless/lib/browser/headless_browser_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698