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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverAdapter); | 60 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverAdapter); |
61 }; | 61 }; |
62 | 62 |
63 class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { | 63 class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate { |
64 public: | 64 public: |
65 explicit Delegate(HeadlessBrowserContextImpl* browser_context) | 65 explicit Delegate(HeadlessBrowserContextImpl* browser_context) |
66 : browser_context_(browser_context) {} | 66 : browser_context_(browser_context) {} |
67 | 67 |
68 void WebContentsCreated(content::WebContents* source_contents, | 68 void WebContentsCreated(content::WebContents* source_contents, |
| 69 int opener_render_process_id, |
69 int opener_render_frame_id, | 70 int opener_render_frame_id, |
70 const std::string& frame_name, | 71 const std::string& frame_name, |
71 const GURL& target_url, | 72 const GURL& target_url, |
72 content::WebContents* new_contents) override { | 73 content::WebContents* new_contents) override { |
73 std::unique_ptr<HeadlessWebContentsImpl> web_contents = | 74 std::unique_ptr<HeadlessWebContentsImpl> web_contents = |
74 HeadlessWebContentsImpl::CreateFromWebContents(new_contents, | 75 HeadlessWebContentsImpl::CreateFromWebContents(new_contents, |
75 browser_context_); | 76 browser_context_); |
76 | 77 |
77 DCHECK(new_contents->GetBrowserContext() == browser_context_); | 78 DCHECK(new_contents->GetBrowserContext() == browser_context_); |
78 | 79 |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 HeadlessWebContents::Builder::MojoService::MojoService() {} | 257 HeadlessWebContents::Builder::MojoService::MojoService() {} |
257 | 258 |
258 HeadlessWebContents::Builder::MojoService::MojoService( | 259 HeadlessWebContents::Builder::MojoService::MojoService( |
259 const std::string& service_name, | 260 const std::string& service_name, |
260 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) | 261 const base::Callback<void(mojo::ScopedMessagePipeHandle)>& service_factory) |
261 : service_name(service_name), service_factory(service_factory) {} | 262 : service_name(service_name), service_factory(service_factory) {} |
262 | 263 |
263 HeadlessWebContents::Builder::MojoService::~MojoService() {} | 264 HeadlessWebContents::Builder::MojoService::~MojoService() {} |
264 | 265 |
265 } // namespace headless | 266 } // namespace headless |
OLD | NEW |