forked from cefsharp/CefSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScriptCore.h
More file actions
30 lines (24 loc) · 822 Bytes
/
Copy pathScriptCore.h
File metadata and controls
30 lines (24 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "Stdafx.h"
#pragma once
namespace CefSharp
{
class ScriptCore
{
private:
HANDLE _event;
gcroot<Object^> _result;
gcroot<String^> _exceptionMessage;
bool TryGetMainFrame(CefRefPtr<CefBrowser> browser, CefRefPtr<CefFrame>& frame);
void UIT_Execute(CefRefPtr<CefBrowser> browser, CefString script);
void UIT_Evaluate(CefRefPtr<CefBrowser> browser, CefString script);
public:
ScriptCore()
{
_event = CreateEvent(NULL, FALSE, FALSE, NULL);
}
DECL void Execute(CefRefPtr<CefBrowser> browser, CefString script);
DECL gcroot<Object^> Evaluate(CefRefPtr<CefBrowser> browser, CefString script, double timeout);
IMPLEMENT_LOCKING(ScriptCore);
IMPLEMENT_REFCOUNTING(ScriptCore);
};
}