| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 5 #include <memory> |
| 6 #include <sstream> | 6 #include <sstream> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 parsed_window_size->set_height(height); | 52 parsed_window_size->set_height(height); |
| 53 return true; | 53 return true; |
| 54 } | 54 } |
| 55 return false; | 55 return false; |
| 56 } | 56 } |
| 57 } // namespace | 57 } // namespace |
| 58 | 58 |
| 59 HeadlessShell::HeadlessShell() | 59 HeadlessShell::HeadlessShell() |
| 60 : browser_(nullptr), | 60 : browser_(nullptr), |
| 61 devtools_client_(HeadlessDevToolsClient::Create()), | 61 devtools_client_(HeadlessDevToolsClient::Create()), |
| 62 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
| 62 web_contents_(nullptr), | 63 web_contents_(nullptr), |
| 64 browser_context_(nullptr), |
| 65 #endif |
| 63 processed_page_ready_(false), | 66 processed_page_ready_(false), |
| 64 browser_context_(nullptr), | 67 weak_factory_(this) { |
| 65 weak_factory_(this) {} | 68 } |
| 66 | 69 |
| 67 HeadlessShell::~HeadlessShell() {} | 70 HeadlessShell::~HeadlessShell() {} |
| 68 | 71 |
| 69 void HeadlessShell::OnStart(HeadlessBrowser* browser) { | 72 void HeadlessShell::OnStart(HeadlessBrowser* browser) { |
| 70 // TODO(dvallet): Consider making a Windows specific class to make specific | 73 // TODO(dvallet): Consider making a Windows specific class to make specific |
| 71 // child builds clearer. | 74 // child builds clearer. |
| 72 #if !defined(CHROME_MULTIPLE_DLL_CHILD) | 75 #if !defined(CHROME_MULTIPLE_DLL_CHILD) |
| 73 browser_ = browser; | 76 browser_ = browser; |
| 74 | 77 |
| 75 HeadlessBrowserContext::Builder context_builder = | 78 HeadlessBrowserContext::Builder context_builder = |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 667 |
| 665 int HeadlessShellMain(const content::ContentMainParams& params) { | 668 int HeadlessShellMain(const content::ContentMainParams& params) { |
| 666 #if defined(OS_WIN) | 669 #if defined(OS_WIN) |
| 667 return HeadlessShellMain(params.instance, params.sandbox_info); | 670 return HeadlessShellMain(params.instance, params.sandbox_info); |
| 668 #else | 671 #else |
| 669 return HeadlessShellMain(params.argc, params.argv); | 672 return HeadlessShellMain(params.argc, params.argv); |
| 670 #endif | 673 #endif |
| 671 } | 674 } |
| 672 | 675 |
| 673 } // namespace headless | 676 } // namespace headless |
| OLD | NEW |