Index: headless/lib/headless_browser_impl.h |
diff --git a/headless/lib/headless_browser_impl.h b/headless/lib/headless_browser_impl.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..89afdea2ec8e8bd9f5b3251e58314839e8b06641 |
--- /dev/null |
+++ b/headless/lib/headless_browser_impl.h |
@@ -0,0 +1,54 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef HEADLESS_LIB_HEADLESS_BROWSER_IMPL_H_ |
+#define HEADLESS_LIB_HEADLESS_BROWSER_IMPL_H_ |
+ |
+#include "headless/public/headless_browser.h" |
+ |
+#include "base/memory/scoped_ptr.h" |
+#include "base/synchronization/lock.h" |
+#include "headless/lib/headless_web_contents_impl.h" |
+ |
+namespace headless { |
+ |
+class HeadlessBrowserContext; |
+class HeadlessBrowserMainParts; |
+ |
+class HeadlessBrowserImpl : public HeadlessBrowser { |
+ public: |
+ ~HeadlessBrowserImpl() override; |
+ |
+ // HeadlessBrowser implementation: |
+ scoped_ptr<HeadlessWebContents> CreateWebContents( |
+ const gfx::Size& size) override; |
+ scoped_refptr<base::SingleThreadTaskRunner> BrowserMainThread() override; |
+ |
+ void Stop() override; |
+ |
+ void set_browser_main_parts(HeadlessBrowserMainParts* browser_main_parts); |
+ HeadlessBrowserMainParts* browser_main_parts(); |
alex clarke (OOO till 29th)
2016/02/10 17:49:22
Can this and browser_context() be const?
Sami
2016/02/10 18:47:38
Done.
|
+ |
+ HeadlessBrowserContext* browser_context(); |
+ |
+ void RunOnStartCallback(); |
+ |
+ const HeadlessBrowser::Options& options() const { return options_; } |
+ |
+ protected: |
+ friend class HeadlessBrowser; |
+ |
+ HeadlessBrowserImpl(const StartCallback& on_start_callback, |
+ const HeadlessBrowser::Options& options); |
+ |
+ StartCallback on_start_callback_; |
+ HeadlessBrowser::Options options_; |
+ HeadlessBrowserMainParts* browser_main_parts_; // Not owned. |
+ |
+ DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl); |
+}; |
+ |
+} // namespace headless |
+ |
+#endif // HEADLESS_LIB_HEADLESS_BROWSER_IMPL_H_ |