| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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.debug.ui.liveedit; | 5 package org.chromium.debug.ui.liveedit; |
| 6 | 6 |
| 7 import static org.chromium.debug.ui.DialogUtils.createErrorOptional; | 7 import static org.chromium.debug.ui.DialogUtils.createErrorOptional; |
| 8 import static org.chromium.debug.ui.DialogUtils.createOptional; | 8 import static org.chromium.debug.ui.DialogUtils.createOptional; |
| 9 | 9 |
| 10 import org.chromium.debug.core.model.PushChangesPlan; | 10 import org.chromium.debug.core.model.PushChangesPlan; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 @Override public PushChangesPlan getChangesPlan() { | 85 @Override public PushChangesPlan getChangesPlan() { |
| 86 return plan; | 86 return plan; |
| 87 } | 87 } |
| 88 }; | 88 }; |
| 89 return createOptional(data); | 89 return createOptional(data); |
| 90 } | 90 } |
| 91 }); | 91 }); |
| 92 done(result); | 92 done(result); |
| 93 } | 93 } |
| 94 public void success(Object report, | 94 public void success(boolean resumed, Object report, |
| 95 final UpdatableScript.ChangeDescription changeDescription) { | 95 final UpdatableScript.ChangeDescription changeDescription) { |
| 96 Optional<Data> result; | 96 Optional<Data> result; |
| 97 if (changeDescription == null) { | 97 if (changeDescription == null) { |
| 98 result = EMPTY_DATA; | 98 result = EMPTY_DATA; |
| 99 } else { | 99 } else { |
| 100 Data data = new Data() { | 100 Data data = new Data() { |
| 101 @Override public PushChangesPlan getChangesPlan() { | 101 @Override public PushChangesPlan getChangesPlan() { |
| 102 return plan; | 102 return plan; |
| 103 } | 103 } |
| 104 @Override public <R> R accept(Visitor<R> visitor) { | 104 @Override public <R> R accept(Visitor<R> visitor) { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 this.result = result; | 192 this.result = result; |
| 193 return true; | 193 return true; |
| 194 } | 194 } |
| 195 } | 195 } |
| 196 | 196 |
| 197 private static final Optional<Data> NO_DATA = createErrorOptional( | 197 private static final Optional<Data> NO_DATA = createErrorOptional( |
| 198 new Message(Messages.PreviewLoader_WAITING_FOR_DIFF, MessagePriority.NONE)
); | 198 new Message(Messages.PreviewLoader_WAITING_FOR_DIFF, MessagePriority.NONE)
); |
| 199 private static final Optional<Data> EMPTY_DATA = | 199 private static final Optional<Data> EMPTY_DATA = |
| 200 createErrorOptional(new Message(Messages.PreviewLoader_FAILED_TO_LOAD, Mes
sagePriority.NONE)); | 200 createErrorOptional(new Message(Messages.PreviewLoader_FAILED_TO_LOAD, Mes
sagePriority.NONE)); |
| 201 } | 201 } |
| OLD | NEW |