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

Side by Side Diff: samples/todomvc/cc/todomvc_presenter.h

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 unified diff | Download patch
« no previous file with comments | « samples/todomvc/android/compile.sh ('k') | samples/todomvc/cc/todomvc_presenter.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file.
4
5 #ifndef TODOMVC_PRESENTER_H_
6 #define TODOMVC_PRESENTER_H_
7
8 #include <inttypes.h>
9
10 #include "todomvc_service.h"
11
12 typedef uint16_t event;
13
14 const uint8_t TAG_CONS_FST = 0;
15 const uint8_t TAG_CONS_SND = 1;
16 const uint8_t TAG_CONS_DELETE_EVENT = 2;
17 const uint8_t TAG_CONS_COMPLETE_EVENT = 3;
18 const uint8_t TAG_CONS_UNCOMPLETE_EVENT = 4;
19
20 void VoidCallback(void*);
21
22 class TodoMVCPresenter {
23 public:
24 // Async forwarding of commands to the Dart presenter.
25 void createItem(char* title);
26 void clearItems();
27
28 static void dispatch(event id);
29
30 // Synchronize with the Dart presentation model.
31 void sync();
32
33 protected:
34 // Patch apply callbacks.
35 virtual void enterPatch() = 0;
36 virtual void enterConsFst() = 0;
37 virtual void enterConsSnd() = 0;
38 virtual void enterConsDeleteEvent() = 0;
39 virtual void enterConsCompleteEvent() = 0;
40 virtual void enterConsUncompleteEvent() = 0;
41 virtual void updateNode(const Node&) = 0;
42
43 // Default patch apply procedure.
44 virtual void applyPatches(const PatchSet&);
45 virtual void applyPatch(const Patch&);
46 };
47
48 #endif // TODOMVC_PRESENTER_H_
OLDNEW
« no previous file with comments | « samples/todomvc/android/compile.sh ('k') | samples/todomvc/cc/todomvc_presenter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698