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

Unified Diff: samples/todomvc/dart/todomvc_presenter.dart

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « samples/todomvc/dart/presentation_graph.dart ('k') | samples/todomvc/dart/todomvc_presenter_model.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/todomvc/dart/todomvc_presenter.dart
diff --git a/samples/todomvc/dart/todomvc_presenter.dart b/samples/todomvc/dart/todomvc_presenter.dart
deleted file mode 100644
index e364c63312eb7a363f1df730e2f4b3ae5308188c..0000000000000000000000000000000000000000
--- a/samples/todomvc/dart/todomvc_presenter.dart
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2015, the Dartino 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.md file.
-
-// Should become auto-generated.
-
-library todomvc_presenter;
-
-import 'todomvc_service.dart';
-import 'todomvc_presenter_model.dart';
-
-abstract class TodoMVCPresenter extends TodoMVCService {
-
- var _presentation = new Nil();
- var _eventManager = new EventManager();
-
- // Construct a "presenter model" from the model.
- Immutable render(Immutable previous);
-
- // Compare two "presenter models" to calculate a patch set for the host.
- MyPatchSet diff(Immutable previous, Immutable current) {
- var patchSet = new MyPatchSet();
- current.diff(previous, null, patchSet);
- for (var patch in patchSet.patches) {
- trace("{ path: ${patch.path}, content: ${patch.content} }");
- }
- return patchSet;
- }
-
- // Update the presentation and get the current patch set.
- MyPatchSet update() {
- var previous = _presentation;
- _presentation = render(previous);
- return diff(previous, _presentation);
- }
-
- // Entry point for synchronizing with the host mirror.
- void sync(PatchSetBuilder result) {
- update().serialize(result, _eventManager);
- }
-
- void reset() {
- _presentation = new Nil();
- _eventManager.clear();
- }
-
- void dispatch(int eventHandlerId) {
- _eventManager.call(eventHandlerId);
- }
-}
« no previous file with comments | « samples/todomvc/dart/presentation_graph.dart ('k') | samples/todomvc/dart/todomvc_presenter_model.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698