OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef PrivateScriptRunner_h | 5 #ifndef PrivateScriptRunner_h |
6 #define PrivateScriptRunner_h | 6 #define PrivateScriptRunner_h |
7 | 7 |
8 #include "wtf/text/WTFString.h" | 8 #include "wtf/text/WTFString.h" |
9 #include <v8.h> | 9 #include <v8.h> |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class ExceptionState; | 13 class ExceptionState; |
14 class LocalFrame; | 14 class LocalFrame; |
15 class ScriptState; | 15 class ScriptState; |
16 | 16 |
17 class PrivateScriptRunner { | 17 class PrivateScriptRunner { |
18 public: | 18 public: |
19 static v8::Handle<v8::Value> installClassIfNeeded(LocalFrame*, String classN
ame); | 19 static v8::Handle<v8::Value> installClassIfNeeded(LocalFrame*, String classN
ame); |
20 static v8::Handle<v8::Value> runDOMAttributeGetter(ScriptState*, String clas
sName, String attributeName, v8::Handle<v8::Value> holder); | 20 static v8::Handle<v8::Value> runDOMAttributeGetter(ScriptState*, String clas
sName, String attributeName, v8::Handle<v8::Value> holder); |
21 static void runDOMAttributeSetter(ScriptState*, String className, String att
ributeName, v8::Handle<v8::Value> holder, v8::Handle<v8::Value> v8Value); | 21 static void runDOMAttributeSetter(ScriptState*, String className, String att
ributeName, v8::Handle<v8::Value> holder, v8::Handle<v8::Value> v8Value); |
22 static v8::Handle<v8::Value> runDOMMethod(ScriptState*, String className, St
ring methodName, v8::Handle<v8::Value> holder, int argc, v8::Handle<v8::Value> a
rgv[]); | 22 static v8::Handle<v8::Value> runDOMMethod(ScriptState*, String className, St
ring methodName, v8::Handle<v8::Value> holder, int argc, v8::Handle<v8::Value> a
rgv[]); |
23 | 23 |
24 static bool throwDOMExceptionInPrivateScriptIfNeeded(v8::Isolate*, Exception
State&, v8::Handle<v8::Value>); | 24 static bool rethrowExceptionInPrivateScript(v8::Isolate*, ExceptionState&, v
8::TryCatch&); |
25 }; | 25 }; |
26 | 26 |
27 } // namespace blink | 27 } // namespace blink |
28 | 28 |
29 #endif // V8PrivateScriptRunner_h | 29 #endif // V8PrivateScriptRunner_h |
OLD | NEW |