Create a dummy method in app that we'll twerk

This commit is contained in:
Paul Betts 2015-10-19 14:43:04 -07:00
parent 8288a22458
commit 717aba9631
2 changed files with 11 additions and 0 deletions

View file

@ -268,6 +268,10 @@ v8::Local<v8::Value> App::DefaultSession(v8::Isolate* isolate) {
return v8::Local<v8::Value>::New(isolate, default_session_);
}
bool App::MakeSingleInstance(const SingleInstanceCallback& callback) {
return false;
}
mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
v8::Isolate* isolate) {
auto browser = base::Unretained(Browser::Get());
@ -294,6 +298,7 @@ mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder(
.SetMethod("allowNTLMCredentialsForAllDomains",
&App::AllowNTLMCredentialsForAllDomains)
.SetMethod("getLocale", &App::GetLocale)
.SetMethod("MakeSingleInstance", &App::MakeSingleInstance)
.SetProperty("defaultSession", &App::DefaultSession);
}

View file

@ -9,6 +9,7 @@
#include "atom/browser/api/event_emitter.h"
#include "atom/browser/browser_observer.h"
#include "atom/common/native_mate_converters/callback.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "native_mate/handle.h"
@ -24,6 +25,8 @@ namespace atom {
namespace api {
using SingleInstanceCallback = base::Callback<void(const std::string&)>;
class App : public mate::EventEmitter,
public BrowserObserver,
public content::GpuDataManagerObserver {
@ -65,7 +68,10 @@ class App : public mate::EventEmitter,
void SetDesktopName(const std::string& desktop_name);
void SetAppUserModelId(const std::string& app_id);
void AllowNTLMCredentialsForAllDomains(bool should_allow);
bool MakeSingleInstance(const SingleInstanceCallback& callback);
std::string GetLocale();
v8::Local<v8::Value> DefaultSession(v8::Isolate* isolate);