Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: content/public/android/java/src/org/chromium/content/common/ContentSwitches.java

Issue 1771223002: Migrate *-ime-thread switches to feature API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: plumb imeadapter instead and fixed nits Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 // Native switch kUtilityProcess 81 // Native switch kUtilityProcess
82 public static final String SWITCH_UTILITY_PROCESS = "utility"; 82 public static final String SWITCH_UTILITY_PROCESS = "utility";
83 83
84 // Native switch kGPUProcess 84 // Native switch kGPUProcess
85 public static final String SWITCH_GPU_PROCESS = "gpu-process"; 85 public static final String SWITCH_GPU_PROCESS = "gpu-process";
86 86
87 // Native switch kDownloadProcess 87 // Native switch kDownloadProcess
88 public static final String SWITCH_DOWNLOAD_PROCESS = "download"; 88 public static final String SWITCH_DOWNLOAD_PROCESS = "download";
89 89
90 // Native switches to enable / disable IME's own thread instead of using mai n UI thread.
91 public static final String ENABLE_IME_THREAD = "enable-ime-thread";
92 public static final String DISABLE_IME_THREAD = "disable-ime-thread";
93
94 // Prevent instantiation. 90 // Prevent instantiation.
95 private ContentSwitches() {} 91 private ContentSwitches() {}
96 92
97 public static String getSwitchValue(final String[] commandLine, String switc hKey) { 93 public static String getSwitchValue(final String[] commandLine, String switc hKey) {
98 if (commandLine == null || switchKey == null) { 94 if (commandLine == null || switchKey == null) {
99 return null; 95 return null;
100 } 96 }
101 // This format should be matched with the one defined in command_line.h. 97 // This format should be matched with the one defined in command_line.h.
102 final String switchKeyPrefix = "--" + switchKey + "="; 98 final String switchKeyPrefix = "--" + switchKey + "=";
103 for (String command : commandLine) { 99 for (String command : commandLine) {
104 if (command != null && command.startsWith(switchKeyPrefix)) { 100 if (command != null && command.startsWith(switchKeyPrefix)) {
105 return command.substring(switchKeyPrefix.length()); 101 return command.substring(switchKeyPrefix.length());
106 } 102 }
107 } 103 }
108 return null; 104 return null;
109 } 105 }
110 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698