1fe6917ac35f06a15def3ac943248dce0d395ade
[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 "wtf/text/WTFString.h"
9 #include <v8.h>
10
11 namespace blink {
12
13 class ExceptionState;
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*, String className, String attributeName, v8::Handle<v8::Value> holder);
21     static void runDOMAttributeSetter(ScriptState*, String className, String attributeName, v8::Handle<v8::Value> holder, v8::Handle<v8::Value> v8Value);
22     static v8::Handle<v8::Value> runDOMMethod(ScriptState*, String className, String methodName, v8::Handle<v8::Value> holder, int argc, v8::Handle<v8::Value> argv[]);
23
24     static bool rethrowExceptionInPrivateScript(v8::Isolate*, ExceptionState&, v8::TryCatch&);
25 };
26
27 } // namespace blink
28
29 #endif // V8PrivateScriptRunner_h