| 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 "extensions/renderer/utils_native_handler.h" | 5 #include "extensions/renderer/utils_native_handler.h" |
| 6 | 6 |
| 7 #include "base/macros.h" |
| 7 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 8 #include "extensions/renderer/script_context.h" | 9 #include "extensions/renderer/script_context.h" |
| 9 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" | 10 #include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h" |
| 10 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" | 11 #include "third_party/WebKit/public/web/WebSerializedScriptValue.h" |
| 11 | 12 |
| 12 namespace extensions { | 13 namespace extensions { |
| 13 | 14 |
| 14 UtilsNativeHandler::UtilsNativeHandler(ScriptContext* context) | 15 UtilsNativeHandler::UtilsNativeHandler(ScriptContext* context) |
| 15 : ObjectBackedNativeHandler(context) { | 16 : ObjectBackedNativeHandler(context) { |
| 16 RouteFunction("createClassWrapper", | 17 RouteFunction("createClassWrapper", |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 } | 86 } |
| 86 | 87 |
| 87 void UtilsNativeHandler::DeepCopy( | 88 void UtilsNativeHandler::DeepCopy( |
| 88 const v8::FunctionCallbackInfo<v8::Value>& args) { | 89 const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 89 CHECK_EQ(1, args.Length()); | 90 CHECK_EQ(1, args.Length()); |
| 90 args.GetReturnValue().Set( | 91 args.GetReturnValue().Set( |
| 91 blink::WebSerializedScriptValue::serialize(args[0]).deserialize()); | 92 blink::WebSerializedScriptValue::serialize(args[0]).deserialize()); |
| 92 } | 93 } |
| 93 | 94 |
| 94 } // namespace extensions | 95 } // namespace extensions |
| OLD | NEW |