tizen 2.4 release
[framework/web/wrt-plugins-common.git] / src / xwalk-module / object_tools_module.h
1 // Copyright 2015 Samsung Electronics Co, Ltd. 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 #ifndef WRT_OBJECT_TOOLS_MODULE_H_
6 #define WRT_OBJECT_TOOLS_MODULE_H_
7
8 #include <JavaScriptCore/JavaScript.h>
9
10 #include "xwalk_module_system.h"
11
12 namespace wrt {
13
14 // This module provides extra JS functions that help writing JS API code for
15 // extensions, for example: allowing setting a read-only property of an object.
16 class ObjectToolsModule : public NativeModule {
17  public:
18   ObjectToolsModule(JSContextRef context);
19   ~ObjectToolsModule();
20
21  private:
22   JSObjectRef NewInstance(JSContextRef context);
23
24   JSObjectRef object_function_;
25   JSContextRef js_context_;
26 };
27
28 }  // namespace wrt
29
30 #endif  // WRT_OBJECT_TOOLS_MODULE_H_
31