| 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/gfx/switches.h" |
| 45 #include "ui/gl/gl_implementation.h" | 46 #include "ui/gl/gl_implementation.h" |
| 46 #include "ui/gl/gl_switches.h" | 47 #include "ui/gl/gl_switches.h" |
| 47 | 48 |
| 48 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. | 49 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
| 49 | 50 |
| 50 #if defined(IPC_MESSAGE_LOG_ENABLED) | 51 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 51 #define IPC_MESSAGE_MACROS_LOG_ENABLED | 52 #define IPC_MESSAGE_MACROS_LOG_ENABLED |
| 52 #include "content/public/common/content_ipc_logging.h" | 53 #include "content/public/common/content_ipc_logging.h" |
| 53 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ | 54 #define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ |
| 54 content::RegisterIPCLogger(msg_id, logger) | 55 content::RegisterIPCLogger(msg_id, logger) |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 command_line.AppendSwitchASCII(switches::kHostResolverRules, | 206 command_line.AppendSwitchASCII(switches::kHostResolverRules, |
| 206 "MAP *.test 127.0.0.1"); | 207 "MAP *.test 127.0.0.1"); |
| 207 | 208 |
| 208 command_line.AppendSwitch(switches::kEnablePartialRaster); | 209 command_line.AppendSwitch(switches::kEnablePartialRaster); |
| 209 | 210 |
| 210 if (!command_line.HasSwitch(switches::kForceGpuRasterization) && | 211 if (!command_line.HasSwitch(switches::kForceGpuRasterization) && |
| 211 !command_line.HasSwitch(switches::kEnableGpuRasterization)) { | 212 !command_line.HasSwitch(switches::kEnableGpuRasterization)) { |
| 212 command_line.AppendSwitch(switches::kDisableGpuRasterization); | 213 command_line.AppendSwitch(switches::kDisableGpuRasterization); |
| 213 } | 214 } |
| 214 | 215 |
| 215 // Unless/until WebM files are added to the media layout tests, we need to | 216 // If the virtual test suite didn't specify a color space, then use the |
| 216 // avoid removing MP4/H264/AAC so that layout tests can run on Android. | 217 // default layout test color space (GenericRGB for Mac and sRGB for all |
| 218 // other platforms). |
| 219 if (!command_line.HasSwitch(switches::kForceColorProfile)) { |
| 220 #if defined(OS_MACOSX) |
| 221 command_line.AppendSwitchASCII(switches::kForceColorProfile, |
| 222 "generic-rgb"); |
| 223 #else |
| 224 command_line.AppendSwitchASCII(switches::kForceColorProfile, "srgb"); |
| 225 #endif |
| 226 } |
| 227 |
| 228 // Unless/until WebM files are added to the media layout tests, we need to |
| 229 // avoid removing MP4/H264/AAC so that layout tests can run on Android. |
| 217 #if !defined(OS_ANDROID) | 230 #if !defined(OS_ANDROID) |
| 218 media::RemoveProprietaryMediaTypesAndCodecsForTests(); | 231 media::RemoveProprietaryMediaTypesAndCodecsForTests(); |
| 219 #endif | 232 #endif |
| 220 | 233 |
| 221 if (!BlinkTestPlatformInitialize()) { | 234 if (!BlinkTestPlatformInitialize()) { |
| 222 *exit_code = 1; | 235 *exit_code = 1; |
| 223 return true; | 236 return true; |
| 224 } | 237 } |
| 225 } | 238 } |
| 226 | 239 |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 382 |
| 370 return renderer_client_.get(); | 383 return renderer_client_.get(); |
| 371 } | 384 } |
| 372 | 385 |
| 373 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { | 386 ContentUtilityClient* ShellMainDelegate::CreateContentUtilityClient() { |
| 374 utility_client_.reset(new ShellContentUtilityClient); | 387 utility_client_.reset(new ShellContentUtilityClient); |
| 375 return utility_client_.get(); | 388 return utility_client_.get(); |
| 376 } | 389 } |
| 377 | 390 |
| 378 } // namespace content | 391 } // namespace content |
| OLD | NEW |