Dart Documentationchrome.typesChromeSetting

ChromeSetting class

An interface that allows access to a Chrome browser setting. See proxy.settings for an example.

class ChromeSetting extends ChromeObject {
 ChromeSetting();
 ChromeSetting.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

 /**
  * Gets the value of a setting.
  * 
  * [details] Which setting to consider.
  * 
  * Returns:
  * Details of the currently effective value.
  */
 Future<Map> get(TypesGetParams details) {
   var completer = new ChromeCompleter<Map>.oneArg(mapify);
   jsProxy.callMethod('get', [jsify(details), completer.callback]);
   return completer.future;
 }

 /**
  * Sets the value of a setting.
  * 
  * [details] Which setting to change.
  */
 Future set(TypesSetParams details) {
   var completer = new ChromeCompleter.noArgs();
   jsProxy.callMethod('set', [jsify(details), completer.callback]);
   return completer.future;
 }

 /**
  * Clears the setting, restoring any default value.
  * 
  * [details] Which setting to clear.
  */
 Future clear(TypesClearParams details) {
   var completer = new ChromeCompleter.noArgs();
   jsProxy.callMethod('clear', [jsify(details), completer.callback]);
   return completer.future;
 }
}

Extends

ChromeObject > ChromeSetting

Constructors

new ChromeSetting() #

Create a new instance of a ChromeObject, which creates and delegates to a JsObject proxy.

docs inherited from ChromeObject
ChromeSetting();

new ChromeSetting.fromProxy(JsObject jsProxy) #

Create a new instance of a ChromeObject, which delegates to the given JsObject proxy.

docs inherited from ChromeObject
ChromeSetting.fromProxy(JsObject jsProxy): super.fromProxy(jsProxy);

Properties

final jsProxy #

inherited from ChromeObject
final dynamic jsProxy

Methods

Future clear(TypesClearParams details) #

Clears the setting, restoring any default value.

details Which setting to clear.

Future clear(TypesClearParams details) {
 var completer = new ChromeCompleter.noArgs();
 jsProxy.callMethod('clear', [jsify(details), completer.callback]);
 return completer.future;
}

Future<Map> get(TypesGetParams details) #

Gets the value of a setting.

details Which setting to consider.

Returns: Details of the currently effective value.

Future<Map> get(TypesGetParams details) {
 var completer = new ChromeCompleter<Map>.oneArg(mapify);
 jsProxy.callMethod('get', [jsify(details), completer.callback]);
 return completer.future;
}

Future set(TypesSetParams details) #

Sets the value of a setting.

details Which setting to change.

Future set(TypesSetParams details) {
 var completer = new ChromeCompleter.noArgs();
 jsProxy.callMethod('set', [jsify(details), completer.callback]);
 return completer.future;
}

JsObject toJs() #

inherited from ChromeObject
JsObject toJs() => jsProxy;

String toString() #

inherited from ChromeObject

Returns a string representation of this object.

docs inherited from Object
String toString() => jsProxy.toString();