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 #include "headless/lib/browser/headless_web_contents_impl.h" | 5 #include "headless/lib/browser/headless_web_contents_impl.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 content::WebContents* web_contents, | 127 content::WebContents* web_contents, |
128 HeadlessBrowserContextImpl* browser_context) { | 128 HeadlessBrowserContextImpl* browser_context) { |
129 std::unique_ptr<HeadlessWebContentsImpl> headless_web_contents = | 129 std::unique_ptr<HeadlessWebContentsImpl> headless_web_contents = |
130 base::WrapUnique( | 130 base::WrapUnique( |
131 new HeadlessWebContentsImpl(web_contents, browser_context)); | 131 new HeadlessWebContentsImpl(web_contents, browser_context)); |
132 | 132 |
133 return headless_web_contents; | 133 return headless_web_contents; |
134 } | 134 } |
135 | 135 |
136 void HeadlessWebContentsImpl::InitializeScreen(const gfx::Size& initial_size) { | 136 void HeadlessWebContentsImpl::InitializeScreen(const gfx::Size& initial_size) { |
137 browser()->PlatformSetWebContents(initial_size, web_contents_.get()); | 137 browser()->PlatformInitializeWebContents(initial_size, web_contents_.get()); |
138 } | 138 } |
139 | 139 |
140 HeadlessWebContentsImpl::HeadlessWebContentsImpl( | 140 HeadlessWebContentsImpl::HeadlessWebContentsImpl( |
141 content::WebContents* web_contents, | 141 content::WebContents* web_contents, |
142 HeadlessBrowserContextImpl* browser_context) | 142 HeadlessBrowserContextImpl* browser_context) |
143 : content::WebContentsObserver(web_contents), | 143 : content::WebContentsObserver(web_contents), |
144 web_contents_delegate_( | 144 web_contents_delegate_( |
145 new HeadlessWebContentsImpl::Delegate(browser_context)), | 145 new HeadlessWebContentsImpl::Delegate(browser_context)), |
146 web_contents_(web_contents), | 146 web_contents_(web_contents), |
147 agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)), | 147 agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)), |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 HeadlessWebContents::Builder::MojoService::MojoService() {} | 294 HeadlessWebContents::Builder::MojoService::MojoService() {} |
295 | 295 |
296 HeadlessWebContents::Builder::MojoService::MojoService( | 296 HeadlessWebContents::Builder::MojoService::MojoService( |
297 const std::string& service_name, | 297 const std::string& service_name, |
298 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) | 298 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) |
299 : service_name(service_name), service_factory(service_factory) {} | 299 : service_name(service_name), service_factory(service_factory) {} |
300 | 300 |
301 HeadlessWebContents::Builder::MojoService::~MojoService() {} | 301 HeadlessWebContents::Builder::MojoService::~MojoService() {} |
302 | 302 |
303 } // namespace headless | 303 } // namespace headless |
OLD | NEW |