Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / bindings / core / v8 / PrivateScriptRunner.h
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
5 #ifndef PrivateScriptRunner_h
6 #define PrivateScriptRunner_h
7
8 #include "bindings/core/v8/ExceptionState.h"
9 #include "wtf/text/WTFString.h"
10 #include <v8.h>
11
12 namespace blink {
13
14 class LocalFrame;
15 class ScriptState;
16
17 class PrivateScriptRunner {
18 public:
19     static v8::Handle<v8::Value> installClassIfNeeded(LocalFrame*, String className);
20     static v8::Handle<v8::Value> runDOMAttributeGetter(ScriptState*, ScriptState* scriptStateInUserScript, const char* className, const char* attributeName, v8::Handle<v8::Value> holder);
21     static bool runDOMAttributeSetter(ScriptState*, ScriptState* scriptStateInUserScript, const char* className, const char* attributeName, v8::Handle<v8::Value> holder, v8::Handle<v8::Value> v8Value);
22     static v8::Handle<v8::Value> runDOMMethod(ScriptState*, ScriptState* scriptStateInUserScript, const char* className, const char* methodName, v8::Handle<v8::Value> holder, int argc, v8::Handle<v8::Value> argv[]);
23 };
24
25 } // namespace blink
26
27 #endif // V8PrivateScriptRunner_h