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

Side by Side Diff: plugins/org.chromium.sdk/src/org/chromium/sdk/JsDeclarativeVariable.java

Issue 12300043: Move setValue operation into a separate JsDeclarativeVariable interface (Closed) Base URL: https://chromedevtools.googlecode.com/svn/trunk
Patch Set: clean Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 package org.chromium.sdk;
6
7 /**
8 * A variable from JavaScript declarative scope. This variable is backed a prope rty of any object,
apavlov 2013/02/20 09:02:02 backed BY a property ?
Peter Rybin 2013/02/21 19:08:48 Done.
9 * instead it is a variable that has been explicitly declared in program, for ex ample with
10 * 'var' keyword.
11 * <p>This variable explicitly supports mutation operation.
12 * @see {@link JsScope.Declarative}
13 */
14 public interface JsDeclarativeVariable extends JsVariable {
15 /**
16 * @return whether it is possible to modify this variable
17 */
18 boolean isMutable();
19
20 /**
21 * Sets a new value for this variable.
22 *
23 * @param newValue to set
24 * @param callback to report the operation result to
25 * @param syncCallback to report the end of any processing
26 * @see #isMutable()
27 * @throws UnsupportedOperationException if this variable is not mutable
28 */
29 RelayOk setValue(JsValue newValue, SetValueCallback callback, SyncCallback syn cCallback)
30 throws UnsupportedOperationException;
31
32 /**
33 * A callback to use while setting a variable value.
34 */
35 interface SetValueCallback {
36 /**
37 * Variable is successfully updated. New value is available in {@link JsVari able#getValue()}.
38 */
39 void success();
40
41 /**
42 * Variable hasn't been updated for unknown reason.
43 */
44 void failure(Exception cause);
45 }
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698