| 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/public/headless_browser.h" |    5 #include "headless/public/headless_browser.h" | 
|    6  |    6  | 
|    7 #include <utility> |    7 #include <utility> | 
|    8  |    8  | 
|    9 #include "content/public/common/user_agent.h" |    9 #include "content/public/common/user_agent.h" | 
|   10  |   10  | 
| (...skipping 10 matching lines...) Expand all  Loading... | 
|   21  |   21  | 
|   22 Options::Options(int argc, const char** argv) |   22 Options::Options(int argc, const char** argv) | 
|   23     : argc(argc), |   23     : argc(argc), | 
|   24       argv(argv), |   24       argv(argv), | 
|   25       message_pump(nullptr), |   25       message_pump(nullptr), | 
|   26       single_process_mode(false), |   26       single_process_mode(false), | 
|   27       disable_sandbox(false), |   27       disable_sandbox(false), | 
|   28       gl_implementation("osmesa"), |   28       gl_implementation("osmesa"), | 
|   29       user_agent(content::BuildUserAgentFromProduct(kProductName)), |   29       user_agent(content::BuildUserAgentFromProduct(kProductName)), | 
|   30       window_size(kDefaultWindowSize), |   30       window_size(kDefaultWindowSize), | 
|   31       incognito_mode(true) {} |   31       incognito_mode(true), | 
 |   32       enable_crash_reporter(false) {} | 
|   32  |   33  | 
|   33 Options::Options(Options&& options) = default; |   34 Options::Options(Options&& options) = default; | 
|   34  |   35  | 
|   35 Options::~Options() {} |   36 Options::~Options() {} | 
|   36  |   37  | 
|   37 Options& Options::operator=(Options&& options) = default; |   38 Options& Options::operator=(Options&& options) = default; | 
|   38  |   39  | 
|   39 Builder::Builder(int argc, const char** argv) : options_(argc, argv) {} |   40 Builder::Builder(int argc, const char** argv) : options_(argc, argv) {} | 
|   40  |   41  | 
|   41 Builder::Builder() : options_(0, nullptr) {} |   42 Builder::Builder() : options_(0, nullptr) {} | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  101   options_.incognito_mode = incognito_mode; |  102   options_.incognito_mode = incognito_mode; | 
|  102   return *this; |  103   return *this; | 
|  103 } |  104 } | 
|  104  |  105  | 
|  105 Builder& Builder::SetOverrideWebPreferencesCallback( |  106 Builder& Builder::SetOverrideWebPreferencesCallback( | 
|  106     base::Callback<void(WebPreferences*)> callback) { |  107     base::Callback<void(WebPreferences*)> callback) { | 
|  107   options_.override_web_preferences_callback = callback; |  108   options_.override_web_preferences_callback = callback; | 
|  108   return *this; |  109   return *this; | 
|  109 } |  110 } | 
|  110  |  111  | 
 |  112 Builder& Builder::SetCrashReporterEnabled(bool enabled) { | 
 |  113   options_.enable_crash_reporter = enabled; | 
 |  114   return *this; | 
 |  115 } | 
 |  116  | 
 |  117 Builder& Builder::SetCrashDumpsDir(const base::FilePath& dir) { | 
 |  118   options_.crash_dumps_dir = dir; | 
 |  119   return *this; | 
 |  120 } | 
 |  121  | 
|  111 Options Builder::Build() { |  122 Options Builder::Build() { | 
|  112   return std::move(options_); |  123   return std::move(options_); | 
|  113 } |  124 } | 
|  114  |  125  | 
|  115 }  // namespace headless |  126 }  // namespace headless | 
| OLD | NEW |