Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "core/testing/CallbackFunctionTest.h" | |
| 6 | |
| 7 #include "bindings/core/v8/ScriptState.h" | |
| 8 #include "bindings/core/v8/V8Binding.h" | |
| 9 #include "bindings/core/v8/V8TestCallback.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 DEFINE_TRACE(CallbackFunctionTest) | |
| 14 { | |
| 15 } | |
| 16 | |
| 17 String CallbackFunctionTest::testCallback(ScriptState* scriptState, V8TestCallba ck* callback, const String& msg1, const String& msg2, ExceptionState& exceptionS tate) | |
|
haraken
2016/09/20 07:08:22
msg => message
Blink prefers a fully qualified na
lkawai
2016/09/20 08:15:07
Done.
| |
| 18 { | |
| 19 ScriptWrappable* scriptWrappable = nullptr; | |
|
haraken
2016/09/20 07:08:22
This variable is redundant. You can directly pass
lkawai
2016/09/20 08:15:07
Done.
| |
| 20 String returnValue; | |
| 21 | |
| 22 if (callback->call(scriptState, scriptWrappable, msg1, msg2, returnValue)) { | |
| 23 return String("SUCCESS: ") + returnValue; | |
| 24 } | |
| 25 return String("Error!"); | |
| 26 } | |
| 27 | |
| 28 } // namespace blink | |
| OLD | NEW |