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

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

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/cc/todomvc_presenter.h ('k') | samples/todomvc/dart/presentation_graph.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/todomvc/cc/todomvc_presenter.cc
diff --git a/samples/todomvc/cc/todomvc_presenter.cc b/samples/todomvc/cc/todomvc_presenter.cc
deleted file mode 100644
index c0b362ecde264fe0621cb376a75321dae12f1fe8..0000000000000000000000000000000000000000
--- a/samples/todomvc/cc/todomvc_presenter.cc
+++ /dev/null
@@ -1,53 +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.
-
-#include "todomvc_presenter.h"
-
-void VoidCallback(void*) {}
-
-void TodoMVCPresenter::createItem(char* title) {
- int length = 0;
- while (title[length] != '\0') ++length;
- int size = 56 + BoxedStringBuilder::kSize + length;
- MessageBuilder builder(size);
- BoxedStringBuilder box = builder.initRoot<BoxedStringBuilder>();
- box.setStr(title);
- TodoMVCService::createItemAsync(box, VoidCallback, NULL);
-}
-
-void TodoMVCPresenter::clearItems() {
- TodoMVCService::clearItemsAsync(VoidCallback, NULL);
-}
-
-void TodoMVCPresenter::dispatch(event id) {
- TodoMVCService::dispatchAsync(id, VoidCallback, NULL);
-}
-
-void TodoMVCPresenter::sync() {
- // Assuming a synchronous call will flush outstanding asynchronous calls.
- applyPatches(TodoMVCService::sync());
-}
-
-void TodoMVCPresenter::applyPatches(const PatchSet& patch_set) {
- List<Patch> patches = patch_set.getPatches();
- for (int i = 0; i < patches.length(); ++i) {
- applyPatch(patches[i]);
- }
-}
-
-void TodoMVCPresenter::applyPatch(const Patch& patch) {
- enterPatch();
- List<uint8_t> path = patch.getPath();
- for (int i = 0; i < path.length(); ++i) {
- switch (path[i]) {
- case TAG_CONS_FST: enterConsFst(); break;
- case TAG_CONS_SND: enterConsSnd(); break;
- case TAG_CONS_DELETE_EVENT: enterConsDeleteEvent(); break;
- case TAG_CONS_COMPLETE_EVENT: enterConsCompleteEvent(); break;
- case TAG_CONS_UNCOMPLETE_EVENT: enterConsUncompleteEvent(); break;
- default: abort();
- }
- }
- updateNode(patch.getContent());
-}
« no previous file with comments | « samples/todomvc/cc/todomvc_presenter.h ('k') | samples/todomvc/dart/presentation_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698