| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bindings/mojo_natives.h" | 6 #include "sky/engine/bindings/mojo_natives.h" |
| 7 | 7 |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 static void SetNullReturn(Dart_NativeArguments arguments) { | 92 static void SetNullReturn(Dart_NativeArguments arguments) { |
| 93 Dart_SetReturnValue(arguments, Dart_Null()); | 93 Dart_SetReturnValue(arguments, Dart_Null()); |
| 94 } | 94 } |
| 95 | 95 |
| 96 static void SetInvalidArgumentReturn(Dart_NativeArguments arguments) { | 96 static void SetInvalidArgumentReturn(Dart_NativeArguments arguments) { |
| 97 Dart_SetIntegerReturnValue( | 97 Dart_SetIntegerReturnValue( |
| 98 arguments, static_cast<int64_t>(MOJO_RESULT_INVALID_ARGUMENT)); | 98 arguments, static_cast<int64_t>(MOJO_RESULT_INVALID_ARGUMENT)); |
| 99 } | 99 } |
| 100 | 100 |
| 101 static Dart_Handle MojoLib() { | 101 static Dart_Handle MojoLib() { |
| 102 return DartBuiltin::LookupLibrary("dart:mojo_core"); | 102 return DartBuiltin::LookupLibrary("mojo:core"); |
| 103 } | 103 } |
| 104 | 104 |
| 105 static Dart_Handle SignalsStateToDart(Dart_Handle klass, | 105 static Dart_Handle SignalsStateToDart(Dart_Handle klass, |
| 106 const MojoHandleSignalsState& state) { | 106 const MojoHandleSignalsState& state) { |
| 107 Dart_Handle arg1 = Dart_NewInteger(state.satisfied_signals); | 107 Dart_Handle arg1 = Dart_NewInteger(state.satisfied_signals); |
| 108 Dart_Handle arg2 = Dart_NewInteger(state.satisfiable_signals); | 108 Dart_Handle arg2 = Dart_NewInteger(state.satisfiable_signals); |
| 109 Dart_Handle args[] = {arg1, arg2}; | 109 Dart_Handle args[] = {arg1, arg2}; |
| 110 return Dart_New(klass, Dart_Null(), 2, args); | 110 return Dart_New(klass, Dart_Null(), 2, args); |
| 111 } | 111 } |
| 112 | 112 |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 CHECK_INTEGER_ARGUMENT(arguments, 0, &control_handle, InvalidArgument); | 800 CHECK_INTEGER_ARGUMENT(arguments, 0, &control_handle, InvalidArgument); |
| 801 mojo_control_handle = control_handle; | 801 mojo_control_handle = control_handle; |
| 802 Dart_SetIntegerReturnValue(arguments, static_cast<int64_t>(MOJO_RESULT_OK)); | 802 Dart_SetIntegerReturnValue(arguments, static_cast<int64_t>(MOJO_RESULT_OK)); |
| 803 } | 803 } |
| 804 | 804 |
| 805 void MojoHandleWatcher_GetControlHandle(Dart_NativeArguments arguments) { | 805 void MojoHandleWatcher_GetControlHandle(Dart_NativeArguments arguments) { |
| 806 Dart_SetIntegerReturnValue(arguments, mojo_control_handle); | 806 Dart_SetIntegerReturnValue(arguments, mojo_control_handle); |
| 807 } | 807 } |
| 808 | 808 |
| 809 } // namespace blink | 809 } // namespace blink |
| OLD | NEW |