mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 23:48:05 +03:00
Use platform independent extension header files
This commit is contained in:
parent
7ef3bab130
commit
5c78ebff42
@ -23,7 +23,7 @@
|
||||
'../v8_extensions/native_linux.cpp',
|
||||
'../v8_extensions/onig_reg_exp_linux.cpp',
|
||||
'../message_translation.cpp',
|
||||
'atom.cpp',
|
||||
'atom_app.cpp',
|
||||
'atom_cef_render_process_handler.cpp',
|
||||
'client_handler.cpp',
|
||||
'io_utils.cpp',
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
#include "atom.h"
|
||||
#include "atom_app.h"
|
||||
#include "atom_cef_app.h"
|
||||
#include "include/cef_app.h"
|
||||
#include "include/cef_browser.h"
|
@ -1,5 +1,5 @@
|
||||
#ifndef ATOM_H_
|
||||
#define ATOM_H_
|
||||
#ifndef ATOM_APP_H_
|
||||
#define ATOM_APP_H_
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
@ -1,15 +1,15 @@
|
||||
#include "atom_cef_render_process_handler.h"
|
||||
#include "atom_linux.h"
|
||||
#include "atom.h"
|
||||
#include "native_linux.h"
|
||||
#include "onig_reg_exp_linux.h"
|
||||
#include "onig_reg_exp.h"
|
||||
#include "io_utils.h"
|
||||
#include "message_translation.h"
|
||||
#include <iostream>
|
||||
|
||||
void AtomCefRenderProcessHandler::OnWebKitInitialized() {
|
||||
new v8_extensions::AtomHandler();
|
||||
new v8_extensions::Atom();
|
||||
new v8_extensions::NativeHandler();
|
||||
new v8_extensions::OnigRegexpExtension();
|
||||
new v8_extensions::OnigRegExp();
|
||||
}
|
||||
|
||||
void AtomCefRenderProcessHandler::OnContextCreated(
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "io_utils.h"
|
||||
#include "atom.h"
|
||||
#include "atom_app.h"
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdlib.h>
|
||||
@ -46,4 +46,4 @@ string io_util_app_directory() {
|
||||
return appPath.substr(0, lastSlash);
|
||||
else
|
||||
return appPath;
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "atom_linux.h"
|
||||
#include "atom.h"
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_runnable.h"
|
||||
#include <iostream>
|
||||
@ -10,7 +10,7 @@ using namespace std;
|
||||
|
||||
namespace v8_extensions {
|
||||
|
||||
AtomHandler::AtomHandler() :
|
||||
Atom::Atom() :
|
||||
CefV8Handler() {
|
||||
string realFilePath = io_utils_real_app_path("/native/v8_extensions/atom.js");
|
||||
if (!realFilePath.empty()) {
|
||||
@ -20,7 +20,7 @@ AtomHandler::AtomHandler() :
|
||||
}
|
||||
}
|
||||
|
||||
bool AtomHandler::Execute(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
bool Atom::Execute(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception) {
|
||||
CefRefPtr<CefBrowser> browser =
|
||||
|
@ -1,23 +0,0 @@
|
||||
#ifndef ATOM_LINUX_H_
|
||||
#define ATOM_LINUX_H_
|
||||
|
||||
#include "include/cef_v8.h"
|
||||
|
||||
namespace v8_extensions {
|
||||
|
||||
class AtomHandler: public CefV8Handler {
|
||||
|
||||
public:
|
||||
AtomHandler();
|
||||
|
||||
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception);
|
||||
|
||||
IMPLEMENT_REFCOUNTING(AtomHandler)
|
||||
;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
@ -1,4 +1,4 @@
|
||||
#include "onig_reg_exp_linux.h"
|
||||
#include "onig_reg_exp.h"
|
||||
#include "include/cef_runnable.h"
|
||||
#include <oniguruma.h>
|
||||
#include <iostream>
|
||||
@ -127,7 +127,7 @@ IMPLEMENT_REFCOUNTING(OnigRegexpUserData)
|
||||
}
|
||||
;
|
||||
|
||||
OnigRegexpExtension::OnigRegexpExtension() :
|
||||
OnigRegExp::OnigRegExp() :
|
||||
CefV8Handler() {
|
||||
string realFilePath = io_utils_real_app_path(
|
||||
"/native/v8_extensions/onig_reg_exp.js");
|
||||
@ -138,7 +138,7 @@ OnigRegexpExtension::OnigRegexpExtension() :
|
||||
}
|
||||
}
|
||||
|
||||
bool OnigRegexpExtension::Execute(const CefString& name,
|
||||
bool OnigRegExp::Execute(const CefString& name,
|
||||
CefRefPtr<CefV8Value> object, const CefV8ValueList& arguments,
|
||||
CefRefPtr<CefV8Value>& retval, CefString& exception) {
|
||||
if (name == "captureIndices") {
|
||||
|
@ -1,24 +0,0 @@
|
||||
#ifndef ONIG_REG_EXP_LINUX_H_
|
||||
#define ONIG_REG_EXP_LINUX_H_
|
||||
|
||||
#include "include/cef_base.h"
|
||||
#include "include/cef_v8.h"
|
||||
|
||||
namespace v8_extensions {
|
||||
|
||||
class OnigRegexpExtension: public CefV8Handler {
|
||||
|
||||
public:
|
||||
OnigRegexpExtension();
|
||||
|
||||
virtual bool Execute(const CefString& name, CefRefPtr<CefV8Value> object,
|
||||
const CefV8ValueList& arguments, CefRefPtr<CefV8Value>& retval,
|
||||
CefString& exception);
|
||||
|
||||
IMPLEMENT_REFCOUNTING(OnigRegexpExtension)
|
||||
;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user