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 <memory> | 10 #include <memory> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 void RunOnStartCallback(); | 65 void RunOnStartCallback(); |
66 | 66 |
67 HeadlessBrowser::Options* options() { return &options_; } | 67 HeadlessBrowser::Options* options() { return &options_; } |
68 | 68 |
69 HeadlessBrowserContext* CreateBrowserContext( | 69 HeadlessBrowserContext* CreateBrowserContext( |
70 HeadlessBrowserContext::Builder* builder); | 70 HeadlessBrowserContext::Builder* builder); |
71 // Close given |browser_context| and delete it | 71 // Close given |browser_context| and delete it |
72 // (all web contents associated with it go away too). | 72 // (all web contents associated with it go away too). |
73 void DestroyBrowserContext(HeadlessBrowserContextImpl* browser_context); | 73 void DestroyBrowserContext(HeadlessBrowserContextImpl* browser_context); |
74 | 74 |
| 75 HeadlessWebContentsImpl* GetWebContentsForWindowId(const int window_id); |
| 76 |
75 base::WeakPtr<HeadlessBrowserImpl> GetWeakPtr(); | 77 base::WeakPtr<HeadlessBrowserImpl> GetWeakPtr(); |
76 | 78 |
77 // All the methods that begin with Platform need to be implemented by the | 79 // All the methods that begin with Platform need to be implemented by the |
78 // platform specific headless implementation. | 80 // platform specific headless implementation. |
79 // Helper for one time initialization of application | 81 // Helper for one time initialization of application |
80 void PlatformInitialize(); | 82 void PlatformInitialize(); |
81 void PlatformCreateWindow(); | 83 void PlatformCreateWindow(); |
82 void PlatformInitializeWebContents(const gfx::Size& initial_size, | 84 void PlatformInitializeWebContents(const gfx::Size& initial_size, |
83 HeadlessWebContentsImpl* web_contents); | 85 HeadlessWebContentsImpl* web_contents); |
84 | 86 |
(...skipping 10 matching lines...) Expand all Loading... |
95 | 97 |
96 base::WeakPtrFactory<HeadlessBrowserImpl> weak_ptr_factory_; | 98 base::WeakPtrFactory<HeadlessBrowserImpl> weak_ptr_factory_; |
97 | 99 |
98 private: | 100 private: |
99 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl); | 101 DISALLOW_COPY_AND_ASSIGN(HeadlessBrowserImpl); |
100 }; | 102 }; |
101 | 103 |
102 } // namespace headless | 104 } // namespace headless |
103 | 105 |
104 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ | 106 #endif // HEADLESS_LIB_BROWSER_HEADLESS_BROWSER_IMPL_H_ |
OLD | NEW |