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

Unified Diff: runtime/observatory/lib/src/elements/shims/binding.dart

Issue 2310003004: Removed polymer & mirror from Observatory (Closed)
Patch Set: Fixed crash in heap-map page Created 4 years, 3 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: runtime/observatory/lib/src/elements/shims/binding.dart
diff --git a/runtime/observatory/lib/src/elements/shims/binding.dart b/runtime/observatory/lib/src/elements/shims/binding.dart
deleted file mode 100644
index c5425c4ba76ac72caa2627cd82ad116b3db566f0..0000000000000000000000000000000000000000
--- a/runtime/observatory/lib/src/elements/shims/binding.dart
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:core';
-import 'dart:html';
-import 'dart:js';
-@MirrorsUsed(metaTargets: const [BindableAnnotation])
-import 'dart:mirrors';
-import 'package:js/js.dart';
-import 'package:js_util/js_util.dart';
-import 'package:polymer/polymer.dart';
-
-const BindableAnnotation bindable = const BindableAnnotation();
-class BindableAnnotation {
- const BindableAnnotation();
-}
-
-
-///This is a temporary bridge between Polymer Bindings and the wrapper entities.
-class Binder<T extends HtmlElement> {
- final Map<String, Symbol> attributes;
-
- const Binder(Map<String, Symbol> attributes)
- : attributes = attributes;
-
- registerCallback(T element) {
- assert(element != null);
- setValue(element, 'bind', allowInteropCaptureThis(_callback));
- }
-
- void _callback(_this, name, value, [other]) {
- final setter = attributes[name];
- if (setter == null) return;
- Bindable bindable;
- if (identical(1, 1.0)) { // dart2js
- bindable = getValue(getValue(value, '__dartBindable'), 'o') as Bindable;
- } else { // vm
- bindable = getValue(value, '__dartBindable');
- }
- var obj = reflect(_this);
- obj.setField(setter, bindable.value);
- bindable.open((value) {
- obj.setField(setter, value);
- });
- }
-}
« no previous file with comments | « runtime/observatory/lib/src/elements/service_ref.html ('k') | runtime/observatory/lib/src/elements/source_inset.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698