| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/app/shell_main_delegate.h" | 5 #include "content/shell/app/shell_main_delegate.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/cpu.h" | 9 #include "base/cpu.h" |
| 10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "content/shell/utility/shell_content_utility_client.h" | 35 #include "content/shell/utility/shell_content_utility_client.h" |
| 36 #include "gpu/config/gpu_switches.h" | 36 #include "gpu/config/gpu_switches.h" |
| 37 #include "media/base/media_switches.h" | 37 #include "media/base/media_switches.h" |
| 38 #include "media/base/mime_util.h" | 38 #include "media/base/mime_util.h" |
| 39 #include "net/cookies/cookie_monster.h" | 39 #include "net/cookies/cookie_monster.h" |
| 40 #include "ppapi/features/features.h" | 40 #include "ppapi/features/features.h" |
| 41 #include "ui/base/resource/resource_bundle.h" | 41 #include "ui/base/resource/resource_bundle.h" |
| 42 #include "ui/base/ui_base_paths.h" | 42 #include "ui/base/ui_base_paths.h" |
| 43 #include "ui/base/ui_base_switches.h" | 43 #include "ui/base/ui_base_switches.h" |
| 44 #include "ui/display/display_switches.h" | 44 #include "ui/display/display_switches.h" |
| 45 #include "ui/gl/gl_implementation.h" |
| 45 #include "ui/gl/gl_switches.h" | 46 #include "ui/gl/gl_switches.h" |
| 46 | 47 |
| 47 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 48 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
| 48 | 49 |
| 49 #if defined(IPC_MESSAGE_LOG_ENABLED) | 50 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 50 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 51 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
| 51 #include "content/public/common/content_ipc_logging.h" | 52 #include "content/public/common/content_ipc_logging.h" |
| 52 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ | 53 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ |
| 53 content::RegisterIPCLogger(msg_id, logger) | 54 content::RegisterIPCLogger(msg_id, logger) |
| 54 #include "content/shell/common/shell_messages.h" | 55 #include "content/shell/common/shell_messages.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 #if BUILDFLAG(ENABLE_PLUGINS) | 161 #if BUILDFLAG(ENABLE_PLUGINS) |
| 161 if (!ppapi::RegisterBlinkTestPlugin(&command_line)) { | 162 if (!ppapi::RegisterBlinkTestPlugin(&command_line)) { |
| 162 *exit_code = 1; | 163 *exit_code = 1; |
| 163 return true; | 164 return true; |
| 164 } | 165 } |
| 165 #endif | 166 #endif |
| 166 command_line.AppendSwitch(cc::switches::kEnableGpuBenchmarking); | 167 command_line.AppendSwitch(cc::switches::kEnableGpuBenchmarking); |
| 167 command_line.AppendSwitch(switches::kProcessPerTab); | 168 command_line.AppendSwitch(switches::kProcessPerTab); |
| 168 command_line.AppendSwitch(switches::kEnableLogging); | 169 command_line.AppendSwitch(switches::kEnableLogging); |
| 169 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); | 170 command_line.AppendSwitch(switches::kAllowFileAccessFromFiles); |
| 170 // only default to osmesa if the flag isn't already specified. | 171 // only default to a software GL if the flag isn't already specified. |
| 171 if (!command_line.HasSwitch(switches::kUseGpuInTests) && | 172 if (!command_line.HasSwitch(switches::kUseGpuInTests) && |
| 172 !command_line.HasSwitch(switches::kUseGL)) { | 173 !command_line.HasSwitch(switches::kUseGL)) { |
| 173 command_line.AppendSwitchASCII(switches::kUseGL, | 174 command_line.AppendSwitchASCII( |
| 174 gl::kGLImplementationOSMesaName); | 175 switches::kUseGL, |
| 176 gl::GetGLImplementationName(gl::GetSoftwareGLImplementation())); |
| 175 } | 177 } |
| 176 command_line.AppendSwitch(switches::kSkipGpuDataLoading); | 178 command_line.AppendSwitch(switches::kSkipGpuDataLoading); |
| 177 command_line.AppendSwitchASCII( | 179 command_line.AppendSwitchASCII( |
| 178 switches::kTouchEventFeatureDetection, | 180 switches::kTouchEventFeatureDetection, |
| 179 switches::kTouchEventFeatureDetectionEnabled); | 181 switches::kTouchEventFeatureDetectionEnabled); |
| 180 if (!command_line.HasSwitch(switches::kForceDeviceScaleFactor)) | 182 if (!command_line.HasSwitch(switches::kForceDeviceScaleFactor)) |
| 181 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); | 183 command_line.AppendSwitchASCII(switches::kForceDeviceScaleFactor, "1.0"); |
| 182 command_line.AppendSwitch( | 184 command_line.AppendSwitch( |
| 183 switches::kDisableGestureRequirementForMediaPlayback); | 185 switches::kDisableGestureRequirementForMediaPlayback); |
| 184 | 186 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 | 370 |
| 369 return renderer_client_.get(); | 371 return renderer_client_.get(); |
| 370 } | 372 } |
| 371 | 373 |
| 372 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 374 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
| 373 utility_client_.reset(new ShellContentUtilityClient); | 375 utility_client_.reset(new ShellContentUtilityClient); |
| 374 return utility_client_.get(); | 376 return utility_client_.get(); |
| 375 } | 377 } |
| 376 | 378 |
| 377 } // namespace content | 379 } // namespace content |
| OLD | NEW |