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_; | |
119 std::unique_ptr<HeadlessTabSocketImpl> headless_tab_socket_; | 118 std::unique_ptr<HeadlessTabSocketImpl> headless_tab_socket_; |
120 | 119 |
121 HeadlessBrowserContextImpl* browser_context_; // Not owned. | 120 HeadlessBrowserContextImpl* browser_context_; // Not owned. |
122 // TODO(alexclarke): With OOPIF there may be more than one renderer, we need | 121 // TODO(alexclarke): With OOPIF there may be more than one renderer, we need |
123 // to fix this. See crbug.com/715924 | 122 // to fix this. See crbug.com/715924 |
124 content::RenderProcessHost* render_process_host_; // Not owned. | 123 content::RenderProcessHost* render_process_host_; // Not owned. |
125 | 124 |
126 using ObserverMap = | 125 using ObserverMap = |
127 std::unordered_map<HeadlessWebContents::Observer*, | 126 std::unordered_map<HeadlessWebContents::Observer*, |
128 std::unique_ptr<WebContentsObserverAdapter>>; | 127 std::unique_ptr<WebContentsObserverAdapter>>; |
129 ObserverMap observer_map_; | 128 ObserverMap observer_map_; |
130 | 129 |
131 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); | 130 DISALLOW_COPY_AND_ASSIGN(HeadlessWebContentsImpl); |
132 }; | 131 }; |
133 | 132 |
134 } // namespace headless | 133 } // namespace headless |
135 | 134 |
136 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ | 135 #endif // HEADLESS_LIB_BROWSER_HEADLESS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |