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

Unified Diff: samples/simple_todo/simple_todo_impl.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/simple_todo/simple_todo.idl ('k') | samples/simple_todo/simple_todo_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/simple_todo/simple_todo_impl.dart
diff --git a/samples/simple_todo/simple_todo_impl.dart b/samples/simple_todo/simple_todo_impl.dart
deleted file mode 100644
index 9b5d66826726a68fdeb6b85c22d015525e254242..0000000000000000000000000000000000000000
--- a/samples/simple_todo/simple_todo_impl.dart
+++ /dev/null
@@ -1,61 +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.
-
-import 'todo_model.dart';
-import 'generated/dart/simple_todo.dart';
-
-class TodoImpl extends TodoService {
- TodoModel _model = new TodoModel();
-
- TodoImpl() {
- _model.createItem("Default todo.");
- _model.createItem("Another todo.");
- }
-
- void createItem(BoxString title) {
- _model.createItem(title.s);
- }
-
- void toggle(int id) {
- if (_model.todos.containsKey(id)) {
- Item item = _model.todos[id];
- if (item.done) {
- item.uncomplete();
- } else {
- item.complete();
- }
- }
- }
-
- void clearItems() {
- _model.clearItems();
- }
-
- void getItem(int index, TodoItemBuilder result) {
- Iterable<Item> items = _model.todos.values;
- if (index >= 0 && index < items.length) {
- Item item = items.elementAt(index);
- result.title = item.title;
- result.done = item.done;
- result.id = item.id;
- }
- }
-
- void getItemById(int id, TodoItemBuilder result) {
- if (_model.todos.containsKey(id)) {
- Item item = _model.todos[id];
- result.id = item.id;
- result.title = item.title;
- result.done = item.done;
- }
- }
-
- int getNoItems() {
- return _model.todos.values.length;
- }
-
- void deleteItem(int id) {
- _model.todos.remove(id);
- }
-}
« no previous file with comments | « samples/simple_todo/simple_todo.idl ('k') | samples/simple_todo/simple_todo_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698