Support opening files from dialog

This commit is contained in:
Kevin Sawicki
2012-06-04 15:57:51 -07:00
parent ad4ae9dc12
commit f1b6bf152d
4 changed files with 34 additions and 8 deletions

View File

@@ -3,14 +3,17 @@
#include "include/cef_base.h"
#include "include/cef_v8.h"
#include <string>
class NativeHandler: public CefV8Handler {
public:
NativeHandler();
CefRefPtr<CefV8Value> object;
GtkWidget* window;
std::string path;
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
@@ -47,6 +50,10 @@ private:
void OpenDialog(const CefString& name, CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
CefString& exception);
void Open(const CefString& name, CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
CefString& exception);
};
#endif