[email protected] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 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 | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 5 | #ifndef EXTENSIONS_RENDERER_UTILS_NATIVE_HANDLER_H_ |
6 | #define EXTENSIONS_RENDERER_UTILS_NATIVE_HANDLER_H_ | ||||
[email protected] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 7 | |
avi | 2d124c0 | 2015-12-23 06:36:42 | [diff] [blame] | 8 | #include "base/macros.h" |
[email protected] | f55c90ee6 | 2014-04-12 00:50:03 | [diff] [blame] | 9 | #include "extensions/renderer/object_backed_native_handler.h" |
[email protected] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 10 | |
11 | namespace extensions { | ||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 12 | class ScriptContext; |
[email protected] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 13 | |
14 | class UtilsNativeHandler : public ObjectBackedNativeHandler { | ||||
15 | public: | ||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 16 | explicit UtilsNativeHandler(ScriptContext* context); |
dcheng | 9168b2f | 2014-10-21 12:38:24 | [diff] [blame] | 17 | ~UtilsNativeHandler() override; |
[email protected] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 18 | |
Devlin Cronin | d9ea834 | 2018-01-27 06:00:04 | [diff] [blame] | 19 | // ObjectBackedNativeHandler: |
20 | void AddRoutes() override; | ||||
21 | |||||
[email protected] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 22 | private: |
[email protected] | 0d17cd7 | 2014-06-20 21:54:29 | [diff] [blame] | 23 | // |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] | 2a35687 | 2014-02-21 23:18:52 | [diff] [blame] | 28 | DISALLOW_COPY_AND_ASSIGN(UtilsNativeHandler); |
29 | }; | ||||
30 | |||||
31 | } // namespace extensions | ||||
32 | |||||
[email protected] | 701a94e | 2014-04-17 04:37:37 | [diff] [blame] | 33 | #endif // EXTENSIONS_RENDERER_UTILS_NATIVE_HANDLER_H_ |