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_WEB_CONTENTS_IMPL_H_ | 5 #ifndef HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 6 #define HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 void InitializeScreen(const gfx::Size& initial_size); | 109 void InitializeScreen(const gfx::Size& initial_size); |
110 using MojoService = HeadlessWebContents::Builder::MojoService; | 110 using MojoService = HeadlessWebContents::Builder::MojoService; |
111 | 111 |
112 class Delegate; | 112 class Delegate; |
113 std::unique_ptr<Delegate> web_contents_delegate_; | 113 std::unique_ptr<Delegate> web_contents_delegate_; |
114 std::unique_ptr<HeadlessWindowTreeHost> window_tree_host_; | 114 std::unique_ptr<HeadlessWindowTreeHost> window_tree_host_; |
115 std::unique_ptr<content::WebContents> web_contents_; | 115 std::unique_ptr<content::WebContents> web_contents_; |
116 scoped_refptr<content::DevToolsAgentHost> agent_host_; | 116 scoped_refptr<content::DevToolsAgentHost> agent_host_; |
117 std::list<MojoService> mojo_services_; | 117 std::list<MojoService> mojo_services_; |
| 118 bool inject_mojo_services_into_isolated_world_; |
118 std::unique_ptr<HeadlessTabSocketImpl> headless_tab_socket_; | 119 std::unique_ptr<HeadlessTabSocketImpl> headless_tab_socket_; |
119 | 120 |
120 HeadlessBrowserContextImpl* browser_context_; // Not owned. | 121 HeadlessBrowserContextImpl* browser_context_; // Not owned. |
121 // TODO(alexclarke): With OOPIF there may be more than one renderer, we need | 122 // TODO(alexclarke): With OOPIF there may be more than one renderer, we need |
122 // to fix this. See crbug.com/715924 | 123 // to fix this. See crbug.com/715924 |
123 content::RenderProcessHost* render_process_host_; // Not owned. | 124 content::RenderProcessHost* render_process_host_; // Not owned. |
124 | 125 |
125 using ObserverMap = | 126 using ObserverMap = |
126 std::unordered_map<HeadlessWebContents::Observer*, | 127 std::unordered_map<HeadlessWebContents::Observer*, |
127 std::unique_ptr<WebContentsObserverAdapter>>; | 128 std::unique_ptr<WebContentsObserverAdapter>>; |
128 ObserverMap observer_map_; | 129 ObserverMap observer_map_; |
129 | 130 |
130 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); | 131 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); |
131 }; | 132 }; |
132 | 133 |
133 } // namespace headless | 134 } // namespace headless |
134 | 135 |
135 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 136 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |