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

Side by Side Diff: runtime/bin/eventhandler.h

Issue 22901017: Always initialize the EventHandler in the standalone. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/eventhandler.cc » ('j') | runtime/bin/eventhandler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_EVENTHANDLER_H_ 5 #ifndef BIN_EVENTHANDLER_H_
6 #define BIN_EVENTHANDLER_H_ 6 #define BIN_EVENTHANDLER_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/isolate_data.h" 9 #include "bin/isolate_data.h"
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 class EventHandler { 105 class EventHandler {
106 public: 106 public:
107 void SendData(intptr_t id, Dart_Port dart_port, int64_t data) { 107 void SendData(intptr_t id, Dart_Port dart_port, int64_t data) {
108 delegate_.SendData(id, dart_port, data); 108 delegate_.SendData(id, dart_port, data);
109 } 109 }
110 110
111 void Shutdown() { 111 void Shutdown() {
112 delegate_.Shutdown(); 112 delegate_.Shutdown();
113 } 113 }
114 114
115 static EventHandler* Start() { 115 static void Start();
116 EventHandler* handler = new EventHandler();
117 handler->delegate_.Start(handler);
118 return handler;
119 }
120 116
121 static void Stop(); 117 static void Stop();
122 118
123 private: 119 private:
124 friend class EventHandlerImplementation; 120 friend class EventHandlerImplementation;
125 EventHandlerImplementation delegate_; 121 EventHandlerImplementation delegate_;
126 }; 122 };
127 123
128 } // namespace bin 124 } // namespace bin
129 } // namespace dart 125 } // namespace dart
130 126
131 #endif // BIN_EVENTHANDLER_H_ 127 #endif // BIN_EVENTHANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/eventhandler.cc » ('j') | runtime/bin/eventhandler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698