| 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 package org.chromium.content.common; | 5 package org.chromium.content.common; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * Contains all of the command line switches that are specific to the content/ | 8 * Contains all of the command line switches that are specific to the content/ |
| 9 * portion of Chromium on Android. | 9 * portion of Chromium on Android. |
| 10 */ | 10 */ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // Native switch kGPUProcess | 71 // Native switch kGPUProcess |
| 72 public static final String SWITCH_GPU_PROCESS = "gpu-process"; | 72 public static final String SWITCH_GPU_PROCESS = "gpu-process"; |
| 73 | 73 |
| 74 // Enable content intent detection in the renderer | 74 // Enable content intent detection in the renderer |
| 75 public static final String ENABLE_CONTENT_INTENT_DETECTION = "enable-content
-intent-detection"; | 75 public static final String ENABLE_CONTENT_INTENT_DETECTION = "enable-content
-intent-detection"; |
| 76 | 76 |
| 77 // Use fake device for Media Stream to replace actual camera and microphone. | 77 // Use fake device for Media Stream to replace actual camera and microphone. |
| 78 public static final String USE_FAKE_DEVICE_FOR_MEDIA_STREAM = | 78 public static final String USE_FAKE_DEVICE_FOR_MEDIA_STREAM = |
| 79 "use-fake-device-for-media-stream"; | 79 "use-fake-device-for-media-stream"; |
| 80 | 80 |
| 81 // Disable motion event batching through View.requestUnbufferedDispatch(). | |
| 82 public static final String REQUEST_UNBUFFERED_DISPATCH = "request-unbuffered
-dispatch"; | |
| 83 | |
| 84 // Prevent instantiation. | 81 // Prevent instantiation. |
| 85 private ContentSwitches() {} | 82 private ContentSwitches() {} |
| 86 | 83 |
| 87 public static String getSwitchValue(final String[] commandLine, String switc
hKey) { | 84 public static String getSwitchValue(final String[] commandLine, String switc
hKey) { |
| 88 if (commandLine == null || switchKey == null) { | 85 if (commandLine == null || switchKey == null) { |
| 89 return null; | 86 return null; |
| 90 } | 87 } |
| 91 // This format should be matched with the one defined in command_line.h. | 88 // This format should be matched with the one defined in command_line.h. |
| 92 final String switchKeyPrefix = "--" + switchKey + "="; | 89 final String switchKeyPrefix = "--" + switchKey + "="; |
| 93 for (String command : commandLine) { | 90 for (String command : commandLine) { |
| 94 if (command != null && command.startsWith(switchKeyPrefix)) { | 91 if (command != null && command.startsWith(switchKeyPrefix)) { |
| 95 return command.substring(switchKeyPrefix.length()); | 92 return command.substring(switchKeyPrefix.length()); |
| 96 } | 93 } |
| 97 } | 94 } |
| 98 return null; | 95 return null; |
| 99 } | 96 } |
| 100 } | 97 } |
| OLD | NEW |