blob: 05adfe02662eca8ace2a54795c26b03afdb2b80f [file] [log] [blame]
[email protected]2a356872014-02-21 23:18:521// Copyright 2014 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
[email protected]701a94e2014-04-17 04:37:375#ifndef EXTENSIONS_RENDERER_UTILS_NATIVE_HANDLER_H_
6#define EXTENSIONS_RENDERER_UTILS_NATIVE_HANDLER_H_
[email protected]2a356872014-02-21 23:18:527
avi2d124c02015-12-23 06:36:428#include "base/macros.h"
[email protected]f55c90ee62014-04-12 00:50:039#include "extensions/renderer/object_backed_native_handler.h"
[email protected]2a356872014-02-21 23:18:5210
11namespace extensions {
[email protected]701a94e2014-04-17 04:37:3712class ScriptContext;
[email protected]2a356872014-02-21 23:18:5213
14class UtilsNativeHandler : public ObjectBackedNativeHandler {
15 public:
[email protected]701a94e2014-04-17 04:37:3716 explicit UtilsNativeHandler(ScriptContext* context);
dcheng9168b2f2014-10-21 12:38:2417 ~UtilsNativeHandler() override;
[email protected]2a356872014-02-21 23:18:5218
Devlin Cronind9ea8342018-01-27 06:00:0419 // ObjectBackedNativeHandler:
20 void AddRoutes() override;
21
[email protected]2a356872014-02-21 23:18:5222 private:
[email protected]0d17cd72014-06-20 21:54:2923 // |args| consists of one argument: an arbitrary value. Returns a deep copy of
24 // that value. The copy will have no references to nested values of the
25 // argument.
26 void DeepCopy(const v8::FunctionCallbackInfo<v8::Value>& args);
27
[email protected]2a356872014-02-21 23:18:5228 DISALLOW_COPY_AND_ASSIGN(UtilsNativeHandler);
29};
30
31} // namespace extensions
32
[email protected]701a94e2014-04-17 04:37:3733#endif // EXTENSIONS_RENDERER_UTILS_NATIVE_HANDLER_H_