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

Side by Side Diff: sky/engine/core/script/dart_controller.cc

Issue 962043002: Expose Android sensors to via Mojo services (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Review comments Created 5 years, 9 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 | « sky/apk/demo/AndroidManifest.xml ('k') | sky/examples/shell/sensor.sky » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "sky/engine/config.h" 5 #include "sky/engine/config.h"
6 #include "sky/engine/core/script/dart_controller.h" 6 #include "sky/engine/core/script/dart_controller.h"
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (!Dart_IsFunction(entry)) 147 if (!Dart_IsFunction(entry))
148 return; 148 return;
149 149
150 Dart_Handle args[] = { 150 Dart_Handle args[] = {
151 ToDart(script), 151 ToDart(script),
152 }; 152 };
153 DartInvokeAppField(library, ToDart(name), arraysize(args), args); 153 DartInvokeAppField(library, ToDart(name), arraysize(args), args);
154 } 154 }
155 155
156 static void UnhandledExceptionCallback(Dart_Handle error) { 156 static void UnhandledExceptionCallback(Dart_Handle error) {
157 DCHECK(!Dart_IsError(error));
158 LOG(ERROR) << Dart_GetError(error); 157 LOG(ERROR) << Dart_GetError(error);
159 } 158 }
160 159
161 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, 160 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
162 Dart_Handle library, 161 Dart_Handle library,
163 Dart_Handle url) { 162 Dart_Handle url) {
164 return DartLoader::HandleLibraryTag(tag, library, url); 163 return DartLoader::HandleLibraryTag(tag, library, url);
165 } 164 }
166 165
167 static void IsolateShutdownCallback(void* callback_data) { 166 static void IsolateShutdownCallback(void* callback_data) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 300
302 CHECK(Dart_SetVMFlags(argc, argv)); 301 CHECK(Dart_SetVMFlags(argc, argv));
303 CHECK(Dart_Initialize(IsolateCreateCallback, 302 CHECK(Dart_Initialize(IsolateCreateCallback,
304 nullptr, // Isolate interrupt callback. 303 nullptr, // Isolate interrupt callback.
305 UnhandledExceptionCallback, IsolateShutdownCallback, 304 UnhandledExceptionCallback, IsolateShutdownCallback,
306 // File IO callbacks. 305 // File IO callbacks.
307 nullptr, nullptr, nullptr, nullptr, nullptr)); 306 nullptr, nullptr, nullptr, nullptr, nullptr));
308 } 307 }
309 308
310 } // namespace blink 309 } // namespace blink
OLDNEW
« no previous file with comments | « sky/apk/demo/AndroidManifest.xml ('k') | sky/examples/shell/sensor.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698