Create a dummy method in app that we'll twerk
authorPaul Betts <paul@paulbetts.org>
Mon, 19 Oct 2015 21:43:04 +0000 (14:43 -0700)
committerPaul Betts <paul@paulbetts.org>
Tue, 20 Oct 2015 20:15:11 +0000 (13:15 -0700)
atom/browser/api/atom_api_app.cc
atom/browser/api/atom_api_app.h

index f124b00..27cc137 100644 (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);
 }
 
index 75889d2..ae79abe 100644 (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);