Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Side by Side Diff: headless/lib/browser/headless_web_contents_impl.cc

Issue 2787373002: [headless] Use individual aura::WindowTreeHosts per WebContents. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 content::WebContents* web_contents, 152 content::WebContents* web_contents,
153 HeadlessBrowserContextImpl* browser_context) { 153 HeadlessBrowserContextImpl* browser_context) {
154 std::unique_ptr<HeadlessWebContentsImpl> headless_web_contents = 154 std::unique_ptr<HeadlessWebContentsImpl> headless_web_contents =
155 base::WrapUnique( 155 base::WrapUnique(
156 new HeadlessWebContentsImpl(web_contents, browser_context)); 156 new HeadlessWebContentsImpl(web_contents, browser_context));
157 157
158 return headless_web_contents; 158 return headless_web_contents;
159 } 159 }
160 160
161 void HeadlessWebContentsImpl::InitializeScreen(const gfx::Size& initial_size) { 161 void HeadlessWebContentsImpl::InitializeScreen(const gfx::Size& initial_size) {
162 browser()->PlatformInitializeWebContents(initial_size, web_contents_.get()); 162 browser()->PlatformInitializeWebContents(initial_size, this);
163 } 163 }
164 164
165 HeadlessWebContentsImpl::HeadlessWebContentsImpl( 165 HeadlessWebContentsImpl::HeadlessWebContentsImpl(
166 content::WebContents* web_contents, 166 content::WebContents* web_contents,
167 HeadlessBrowserContextImpl* browser_context) 167 HeadlessBrowserContextImpl* browser_context)
168 : content::WebContentsObserver(web_contents), 168 : content::WebContentsObserver(web_contents),
169 web_contents_delegate_( 169 web_contents_delegate_(
170 new HeadlessWebContentsImpl::Delegate(browser_context)), 170 new HeadlessWebContentsImpl::Delegate(browser_context)),
171 web_contents_(web_contents), 171 web_contents_(web_contents),
172 agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)), 172 agent_host_(content::DevToolsAgentHost::GetOrCreateFor(web_contents)),
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 HeadlessWebContents::Builder::MojoService::MojoService() {} 319 HeadlessWebContents::Builder::MojoService::MojoService() {}
320 320
321 HeadlessWebContents::Builder::MojoService::MojoService( 321 HeadlessWebContents::Builder::MojoService::MojoService(
322 const std::string& service_name, 322 const std::string& service_name,
323 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) 323 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory)
324 : service_name(service_name), service_factory(service_factory) {} 324 : service_name(service_name), service_factory(service_factory) {}
325 325
326 HeadlessWebContents::Builder::MojoService::~MojoService() {} 326 HeadlessWebContents::Builder::MojoService::~MojoService() {}
327 327
328 } // namespace headless 328 } // namespace headless
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698