| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.sdk.internal.wip; | 5 package org.chromium.sdk.internal.wip; |
| 6 | 6 |
| 7 import java.io.IOException; | 7 import java.io.IOException; |
| 8 import java.util.Arrays; | 8 import java.util.Arrays; |
| 9 import java.util.Collection; | 9 import java.util.Collection; |
| 10 import java.util.EnumMap; | 10 import java.util.EnumMap; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 TabDebugEventListener tabListener, String preliminaryUrl) throws IOExcepti
on { | 67 TabDebugEventListener tabListener, String preliminaryUrl) throws IOExcepti
on { |
| 68 this.socket = socket; | 68 this.socket = socket; |
| 69 this.browserImpl = browserImpl; | 69 this.browserImpl = browserImpl; |
| 70 this.tabListener = tabListener; | 70 this.tabListener = tabListener; |
| 71 this.url = preliminaryUrl; | 71 this.url = preliminaryUrl; |
| 72 | 72 |
| 73 this.closeSignalRelay = SignalRelay.create(new SignalRelay.Callback<Void>()
{ | 73 this.closeSignalRelay = SignalRelay.create(new SignalRelay.Callback<Void>()
{ |
| 74 @Override | 74 @Override |
| 75 public void onSignal(Void signal, Exception cause) { | 75 public void onSignal(Void signal, Exception cause) { |
| 76 WipTabImpl.this.tabListener.closed(); | 76 WipTabImpl.this.tabListener.closed(); |
| 77 WipTabImpl.this.tabListener.getDebugEventListener().disconnected(); |
| 77 } | 78 } |
| 78 }); | 79 }); |
| 79 | 80 |
| 80 try { | 81 try { |
| 81 closeSignalRelay.bind(socket.getCloser(), null, null); | 82 closeSignalRelay.bind(socket.getCloser(), null, null); |
| 82 } catch (AlreadySignalledException e) { | 83 } catch (AlreadySignalledException e) { |
| 83 throw new IOException("Connection is closed", e); | 84 throw new IOException("Connection is closed", e); |
| 84 } | 85 } |
| 85 | 86 |
| 86 commandProcessor = new WipCommandProcessor(this, socket); | 87 commandProcessor = new WipCommandProcessor(this, socket); |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 397 |
| 397 SDK_TO_WIP_CATCH_MODE.put(ExceptionCatchMode.ALL, SetPauseOnExceptionsPara
ms.State.ALL); | 398 SDK_TO_WIP_CATCH_MODE.put(ExceptionCatchMode.ALL, SetPauseOnExceptionsPara
ms.State.ALL); |
| 398 SDK_TO_WIP_CATCH_MODE.put(ExceptionCatchMode.UNCAUGHT, | 399 SDK_TO_WIP_CATCH_MODE.put(ExceptionCatchMode.UNCAUGHT, |
| 399 SetPauseOnExceptionsParams.State.UNCAUGHT); | 400 SetPauseOnExceptionsParams.State.UNCAUGHT); |
| 400 SDK_TO_WIP_CATCH_MODE.put(ExceptionCatchMode.NONE, SetPauseOnExceptionsPar
ams.State.NONE); | 401 SDK_TO_WIP_CATCH_MODE.put(ExceptionCatchMode.NONE, SetPauseOnExceptionsPar
ams.State.NONE); |
| 401 | 402 |
| 402 assert SDK_TO_WIP_CATCH_MODE.size() == ExceptionCatchMode.values().length; | 403 assert SDK_TO_WIP_CATCH_MODE.size() == ExceptionCatchMode.values().length; |
| 403 } | 404 } |
| 404 } | 405 } |
| 405 } | 406 } |
| OLD | NEW |