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

Unified Diff: components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/ClientSessionTestingHost.java

Issue 1142463003: Remove devtools_bridge component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/ClientSessionTestingHost.java
diff --git a/components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/ClientSessionTestingHost.java b/components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/ClientSessionTestingHost.java
deleted file mode 100644
index 441353a8f0f24a86884035b0bbdf1614cba4adab..0000000000000000000000000000000000000000
--- a/components/devtools_bridge/test/android/javatests/src/org/chromium/components/devtools_bridge/ClientSessionTestingHost.java
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.components.devtools_bridge;
-
-import android.util.Log;
-
-import java.io.IOException;
-
-/**
- * Helper class which handles a client session in tests. Having direct reference to
- * the server it runs its client session on a dedicated thread and proxies all call
- * between them to satisfy theading requirements.
- */
-public class ClientSessionTestingHost {
- private static final String TAG = "ClientSessionTestingHost";
-
- private final SignalingReceiver mTarget;
- private final SessionBase.Executor mTargetExecutor;
- private final LocalSessionBridge.ThreadedExecutor mClientExecutor;
- private final String mSessionId;
- private final ClientSession mClientSession;
-
- public ClientSessionTestingHost(
- SessionDependencyFactory factory,
- SignalingReceiver target, SessionBase.Executor targetExecutor,
- String sessionId, String clientSocketName)
- throws IOException {
- mTarget = target;
- mTargetExecutor = targetExecutor;
- mClientExecutor = new LocalSessionBridge.ThreadedExecutor();
-
- mSessionId = sessionId;
-
- SignalingReceiverProxy proxy = new SignalingReceiverProxy(
- mTargetExecutor, mClientExecutor, target, 0);
-
- mClientSession = new ClientSession(
- factory,
- mClientExecutor,
- proxy.asServerSession(mSessionId),
- clientSocketName) {
- @Override
- protected void closeSelf() {
- Log.d(TAG, "Closed self");
- super.closeSelf();
- }
-
- @Override
- protected void onControlChannelOpened() {
- Log.d(TAG, "Control channel opened");
- super.onControlChannelOpened();
- }
-
- @Override
- protected void onControlChannelClosed() {
- Log.d(TAG, "Control channel closed");
- super.onControlChannelClosed();
- }
-
- @Override
- protected void onFailure(String message) {
- Log.e(TAG, "Failure: " + message);
- super.onFailure(message);
- }
- };
- }
-
- public void dispose() {
- mClientExecutor.runSynchronously(new Runnable() {
- @Override
- public void run() {
- mClientSession.dispose();
- }
- });
- }
-
- public void start() {
- start(new RTCConfiguration());
- }
-
- public void start(final RTCConfiguration config) {
- mClientExecutor.runSynchronously(new Runnable() {
- @Override
- public void run() {
- mClientSession.start(config);
- }
- });
- }
-}

Powered by Google App Engine
This is Rietveld 408576698