OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // TODO(port): the ifdefs in here are a first step towards trying to determine | 5 // TODO(port): the ifdefs in here are a first step towards trying to determine |
6 // the correct abstraction for all the OS functionality required at this | 6 // the correct abstraction for all the OS functionality required at this |
7 // stage of process initialization. It should not be taken as a final | 7 // stage of process initialization. It should not be taken as a final |
8 // abstraction. | 8 // abstraction. |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); | 559 CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR); |
560 #endif // OS_POSIX | 560 #endif // OS_POSIX |
561 | 561 |
562 if (parsed_command_line.HasSwitch(switches::kEnableNaCl)) { | 562 if (parsed_command_line.HasSwitch(switches::kEnableNaCl)) { |
563 // NaCl currently requires two flags to run | 563 // NaCl currently requires two flags to run |
564 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | 564 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
565 singleton_command_line->AppendSwitch(switches::kInternalNaCl); | 565 singleton_command_line->AppendSwitch(switches::kInternalNaCl); |
566 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); | 566 singleton_command_line->AppendSwitch(switches::kEnableGPUPlugin); |
567 } | 567 } |
568 | 568 |
| 569 // TODO(vangelis): Remove this block once accelerated compositing is enabled |
| 570 // on all platforms. |
| 571 #if defined(OS_MACOSX) |
| 572 // Accelerated compositing is currently disabled by default on the mac, as it |
| 573 // is less stable than other platforms. We disable it by adding a disable |
| 574 // to the command line switches. Note that the rest of the code only checks |
| 575 // for the disable flag, never for enable. |
| 576 if (!parsed_command_line.HasSwitch( |
| 577 switches::kEnableAcceleratedCompositing)) { |
| 578 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
| 579 singleton_command_line->AppendSwitch( |
| 580 switches::kDisableAcceleratedCompositing); |
| 581 } |
| 582 #endif |
| 583 |
569 #if defined(OS_CHROMEOS) | 584 #if defined(OS_CHROMEOS) |
570 if (parsed_command_line.HasSwitch(switches::kBWSI)) { | 585 if (parsed_command_line.HasSwitch(switches::kBWSI)) { |
571 // Disable sync and extensions if we're in "browse without sign-in" mode. | 586 // Disable sync and extensions if we're in "browse without sign-in" mode. |
572 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); | 587 CommandLine* singleton_command_line = CommandLine::ForCurrentProcess(); |
573 singleton_command_line->AppendSwitch(switches::kDisableSync); | 588 singleton_command_line->AppendSwitch(switches::kDisableSync); |
574 singleton_command_line->AppendSwitch(switches::kDisableExtensions); | 589 singleton_command_line->AppendSwitch(switches::kDisableExtensions); |
575 browser_defaults::bookmarks_enabled = false; | 590 browser_defaults::bookmarks_enabled = false; |
576 } | 591 } |
577 #endif | 592 #endif |
578 | 593 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 | 949 |
935 logging::CleanupChromeLogging(); | 950 logging::CleanupChromeLogging(); |
936 | 951 |
937 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 952 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
938 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 953 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
939 DestructCrashReporter(); | 954 DestructCrashReporter(); |
940 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 955 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
941 | 956 |
942 return rv; | 957 return rv; |
943 } | 958 } |
OLD | NEW |