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

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

Issue 10962026: Avoid needless int64_t to intptr_t conversion in eventhandler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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') | no next file with comments »
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 22 matching lines...) Expand all
33 #elif defined(TARGET_OS_MACOS) 33 #elif defined(TARGET_OS_MACOS)
34 #include "bin/eventhandler_macos.h" 34 #include "bin/eventhandler_macos.h"
35 #elif defined(TARGET_OS_WINDOWS) 35 #elif defined(TARGET_OS_WINDOWS)
36 #include "bin/eventhandler_win.h" 36 #include "bin/eventhandler_win.h"
37 #else 37 #else
38 #error Unknown target os. 38 #error Unknown target os.
39 #endif 39 #endif
40 40
41 class EventHandler { 41 class EventHandler {
42 public: 42 public:
43 void SendData(intptr_t id, Dart_Port dart_port, intptr_t data) { 43 void SendData(intptr_t id, Dart_Port dart_port, int64_t data) {
44 delegate_.SendData(id, dart_port, data); 44 delegate_.SendData(id, dart_port, data);
45 } 45 }
46 46
47 void Shutdown() { 47 void Shutdown() {
48 delegate_.Shutdown(); 48 delegate_.Shutdown();
49 } 49 }
50 50
51 static EventHandler* Start() { 51 static EventHandler* Start() {
52 EventHandler* handler = new EventHandler(); 52 EventHandler* handler = new EventHandler();
53 handler->delegate_.Start(); 53 handler->delegate_.Start();
54 IsolateData* isolate_data = 54 IsolateData* isolate_data =
55 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData()); 55 reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
56 isolate_data->event_handler = handler; 56 isolate_data->event_handler = handler;
57 return handler; 57 return handler;
58 } 58 }
59 59
60 private: 60 private:
61 EventHandlerImplementation delegate_; 61 EventHandlerImplementation delegate_;
62 }; 62 };
63 63
64 64
65 #endif // BIN_EVENTHANDLER_H_ 65 #endif // BIN_EVENTHANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/eventhandler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698