| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "blimp/engine/app/blimp_content_main_delegate.h" | 6 #include "blimp/engine/app/blimp_content_main_delegate.h" |
| 7 #include "blimp/engine/app/blimp_engine_config.h" |
| 7 #include "content/public/app/content_main.h" | 8 #include "content/public/app/content_main.h" |
| 8 | 9 |
| 9 const char kEnableOverlayScrollbar[] = "--enable-overlay-scrollbar"; | |
| 10 const char kDisableCachedPictureRaster[] = "--disable-cached-picture-raster"; | |
| 11 const char kDisableGpu[] = "--disable-gpu"; | |
| 12 const char kDisableRemoteFonts[] = "--disable-remote-fonts"; | |
| 13 const char kUseRemoteCompositing[] = "--use-remote-compositing"; | |
| 14 | 10 |
| 15 int main(int argc, const char** argv) { | 11 int main(int argc, const char** argv) { |
| 16 base::CommandLine::Init(argc, argv); | 12 base::CommandLine::Init(argc, argv); |
| 17 | 13 blimp::engine::SetCommandLineDefaults(base::CommandLine::ForCurrentProcess()); |
| 18 // Set internal command line switches for Blimp engine. | |
| 19 base::CommandLine::ForCurrentProcess()->AppendSwitch(kEnableOverlayScrollbar); | |
| 20 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
| 21 kDisableCachedPictureRaster); | |
| 22 base::CommandLine::ForCurrentProcess()->AppendSwitch(kDisableGpu); | |
| 23 base::CommandLine::ForCurrentProcess()->AppendSwitch(kDisableRemoteFonts); | |
| 24 base::CommandLine::ForCurrentProcess()->AppendSwitch(kUseRemoteCompositing); | |
| 25 | 14 |
| 26 blimp::engine::BlimpContentMainDelegate delegate; | 15 blimp::engine::BlimpContentMainDelegate delegate; |
| 27 content::ContentMainParams params(&delegate); | 16 content::ContentMainParams params(&delegate); |
| 28 params.argc = argc; | 17 params.argc = argc; |
| 29 params.argv = argv; | 18 params.argv = argv; |
| 30 return content::ContentMain(params); | 19 return content::ContentMain(params); |
| 31 } | 20 } |
| OLD | NEW |