| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/test/chromedriver/chrome/device_manager.h" | 5 #include "chrome/test/chromedriver/chrome/device_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 std::string known_activity; | 48 std::string known_activity; |
| 49 std::string command_line_file; | 49 std::string command_line_file; |
| 50 std::string device_socket; | 50 std::string device_socket; |
| 51 std::string exec_name; | 51 std::string exec_name; |
| 52 if (package.compare("org.chromium.content_shell_apk") == 0) { | 52 if (package.compare("org.chromium.content_shell_apk") == 0) { |
| 53 // Chromium content shell. | 53 // Chromium content shell. |
| 54 known_activity = ".ContentShellActivity"; | 54 known_activity = ".ContentShellActivity"; |
| 55 device_socket = "content_shell_devtools_remote"; | 55 device_socket = "content_shell_devtools_remote"; |
| 56 command_line_file = "/data/local/tmp/content-shell-command-line"; | 56 command_line_file = "/data/local/tmp/content-shell-command-line"; |
| 57 exec_name = "content_shell"; | 57 exec_name = "content_shell"; |
| 58 } else if (package.compare("org.chromium.chrome.testshell") == 0) { | 58 } else if (package.compare("org.chromium.chrome.shell") == 0) { |
| 59 // Chromium test shell. | 59 // Chromium test shell. |
| 60 known_activity = ".ChromiumTestShellActivity"; | 60 known_activity = ".ChromiumTestShellActivity"; |
| 61 device_socket = "chromium_testshell_devtools_remote"; | 61 device_socket = "chromium_testshell_devtools_remote"; |
| 62 command_line_file = "/data/local/tmp/chromium-testshell-command-line"; | 62 command_line_file = "/data/local/tmp/chromium-testshell-command-line"; |
| 63 exec_name = "chromium_testshell"; | 63 exec_name = "chromium_testshell"; |
| 64 } else if (package.find("chrome") != std::string::npos && | 64 } else if (package.find("chrome") != std::string::npos && |
| 65 package.find("webview") == std::string::npos) { | 65 package.find("webview") == std::string::npos) { |
| 66 // Chrome. | 66 // Chrome. |
| 67 known_activity = "com.google.android.apps.chrome.Main"; | 67 known_activity = "com.google.android.apps.chrome.Main"; |
| 68 device_socket = "chrome_devtools_remote"; | 68 device_socket = "chrome_devtools_remote"; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return new Device(device_serial, adb_, | 213 return new Device(device_serial, adb_, |
| 214 base::Bind(&DeviceManager::ReleaseDevice, base::Unretained(this), | 214 base::Bind(&DeviceManager::ReleaseDevice, base::Unretained(this), |
| 215 device_serial)); | 215 device_serial)); |
| 216 } | 216 } |
| 217 | 217 |
| 218 bool DeviceManager::IsDeviceLocked(const std::string& device_serial) { | 218 bool DeviceManager::IsDeviceLocked(const std::string& device_serial) { |
| 219 return std::find(active_devices_.begin(), active_devices_.end(), | 219 return std::find(active_devices_.begin(), active_devices_.end(), |
| 220 device_serial) != active_devices_.end(); | 220 device_serial) != active_devices_.end(); |
| 221 } | 221 } |
| 222 | 222 |
| OLD | NEW |