| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ |
| 6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ |
| 7 | 7 |
| 8 #include "headless/public/headless_browser.h" | 8 #include "headless/public/headless_browser.h" |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 void set_browser_main_parts(HeadlessBrowserMainParts* browser_main_parts); | 38 void set_browser_main_parts(HeadlessBrowserMainParts* browser_main_parts); |
| 39 HeadlessBrowserMainParts* browser_main_parts() const; | 39 HeadlessBrowserMainParts* browser_main_parts() const; |
| 40 | 40 |
| 41 HeadlessBrowserContext* browser_context() const; | 41 HeadlessBrowserContext* browser_context() const; |
| 42 | 42 |
| 43 void RunOnStartCallback(); | 43 void RunOnStartCallback(); |
| 44 | 44 |
| 45 const HeadlessBrowser::Options& options() const { return options_; } | 45 const HeadlessBrowser::Options& options() const { return options_; } |
| 46 | 46 |
| 47 // Customize the options used by this headless browser instance. Note that |
| 48 // options which take effect before the message loop has been started (e.g., |
| 49 // custom message pumps) cannot be set via this method. |
| 50 void SetOptionsForTesting(const HeadlessBrowser::Options& options); |
| 51 |
| 47 protected: | 52 protected: |
| 48 base::Callback<void(HeadlessBrowser*)> on_start_callback_; | 53 base::Callback<void(HeadlessBrowser*)> on_start_callback_; |
| 49 HeadlessBrowser::Options options_; | 54 HeadlessBrowser::Options options_; |
| 50 HeadlessBrowserMainParts* browser_main_parts_; // Not owned. | 55 HeadlessBrowserMainParts* browser_main_parts_; // Not owned. |
| 51 scoped_ptr<aura::WindowTreeHost> window_tree_host_; | 56 scoped_ptr<aura::WindowTreeHost> window_tree_host_; |
| 52 | 57 |
| 53 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl); | 58 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl); |
| 54 }; | 59 }; |
| 55 | 60 |
| 56 } // namespace headless | 61 } // namespace headless |
| 57 | 62 |
| 58 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ | 63 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ |
| OLD | NEW |