| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "shell/switches.h" | 5 #include "shell/switches.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 | 8 |
| 9 namespace switches { | 9 namespace switches { |
| 10 | 10 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // Allow externally-running applications to discover, connect to, and register | 35 // Allow externally-running applications to discover, connect to, and register |
| 36 // themselves with the shell. | 36 // themselves with the shell. |
| 37 // TODO(cmasone): Work in progress. Once we're sure this works, remove. | 37 // TODO(cmasone): Work in progress. Once we're sure this works, remove. |
| 38 const char kEnableExternalApplications[] = "enable-external-applications"; | 38 const char kEnableExternalApplications[] = "enable-external-applications"; |
| 39 | 39 |
| 40 // Load apps in separate processes. | 40 // Load apps in separate processes. |
| 41 // TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe | 41 // TODO(vtl): Work in progress; doesn't work. Flip this to "disable" (or maybe |
| 42 // change it to "single-process") when it works. | 42 // change it to "single-process") when it works. |
| 43 const char kEnableMultiprocess[] = "enable-multiprocess"; | 43 const char kEnableMultiprocess[] = "enable-multiprocess"; |
| 44 | 44 |
| 45 // In multiprocess mode, force these apps to be loaded in the main process. |
| 46 // Comma-separate list of URLs. Example: |
| 47 // --force-in-process=mojo:native_viewport_service,mojo:network_service |
| 48 const char kForceInProcess[] = "force-in-process"; |
| 49 |
| 45 // Print the usage message and exit. | 50 // Print the usage message and exit. |
| 46 const char kHelp[] = "help"; | 51 const char kHelp[] = "help"; |
| 47 | 52 |
| 48 // Specify origin to map to base url. See url_resolver.cc for details. | 53 // Specify origin to map to base url. See url_resolver.cc for details. |
| 49 // Can be used multiple times. | 54 // Can be used multiple times. |
| 50 const char kMapOrigin[] = "map-origin"; | 55 const char kMapOrigin[] = "map-origin"; |
| 51 | 56 |
| 52 // Map mojo: URLs to a shared library of similar name at this origin. See | 57 // Map mojo: URLs to a shared library of similar name at this origin. See |
| 53 // url_resolver.cc for details. | 58 // url_resolver.cc for details. |
| 54 const char kOrigin[] = "origin"; | 59 const char kOrigin[] = "origin"; |
| 55 | 60 |
| 56 // Specifies a set of mappings to apply when resolving urls. The value is a set | 61 // Specifies a set of mappings to apply when resolving urls. The value is a set |
| 57 // of ',' separated mappings, where each mapping consists of a pair of urls | 62 // of ',' separated mappings, where each mapping consists of a pair of urls |
| 58 // giving the to/from url to map. For example, 'a=b,c=d' contains two mappings, | 63 // giving the to/from url to map. For example, 'a=b,c=d' contains two mappings, |
| 59 // the first maps 'a' to 'b' and the second 'c' to 'd'. | 64 // the first maps 'a' to 'b' and the second 'c' to 'd'. |
| 60 const char kURLMappings[] = "url-mappings"; | 65 const char kURLMappings[] = "url-mappings"; |
| 61 | 66 |
| 62 // Switches valid for the main process (i.e., that the user may pass in). | 67 // Switches valid for the main process (i.e., that the user may pass in). |
| 63 const char* kSwitchArray[] = {kV, | 68 const char* kSwitchArray[] = {kV, |
| 64 kArgsFor, | 69 kArgsFor, |
| 65 // |kChildProcessType| not for user use. | 70 // |kChildProcessType| not for user use. |
| 66 kContentHandlers, | 71 kContentHandlers, |
| 67 kDisableCache, | 72 kDisableCache, |
| 68 kEnableExternalApplications, | 73 kEnableExternalApplications, |
| 69 kEnableMultiprocess, | 74 kEnableMultiprocess, |
| 75 kForceInProcess, |
| 70 kHelp, | 76 kHelp, |
| 71 kMapOrigin, | 77 kMapOrigin, |
| 72 kOrigin, | 78 kOrigin, |
| 73 kURLMappings}; | 79 kURLMappings}; |
| 74 | 80 |
| 75 const std::set<std::string> GetAllSwitches() { | 81 const std::set<std::string> GetAllSwitches() { |
| 76 std::set<std::string> switch_set; | 82 std::set<std::string> switch_set; |
| 77 | 83 |
| 78 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) | 84 for (size_t i = 0; i < arraysize(kSwitchArray); ++i) |
| 79 switch_set.insert(kSwitchArray[i]); | 85 switch_set.insert(kSwitchArray[i]); |
| 80 return switch_set; | 86 return switch_set; |
| 81 } | 87 } |
| 82 | 88 |
| 83 } // namespace switches | 89 } // namespace switches |
| OLD | NEW |