#include "native_mate/dictionary.h"
#include "native_mate/object_template_builder.h"
#include "net/ssl/ssl_cert_request_info.h"
+#include "ui/base/l10n/l10n_util.h"
#if defined(OS_WIN)
#include "base/strings/utf_string_conversions.h"
#endif
}
+std::string App::GetLocale() {
+ return l10n_util::GetApplicationLocale("");
+}
+
v8::Local<v8::Value> App::DefaultSession(v8::Isolate* isolate) {
if (default_session_.IsEmpty())
return v8::Null(isolate);
.SetMethod("getPath", &App::GetPath)
.SetMethod("setDesktopName", &App::SetDesktopName)
.SetMethod("setAppUserModelId", &App::SetAppUserModelId)
+ .SetMethod("getLocale", &App::GetLocale)
.SetProperty("defaultSession", &App::DefaultSession);
}
void SetDesktopName(const std::string& desktop_name);
void SetAppUserModelId(const std::string& app_id);
+ std::string GetLocale();
v8::Local<v8::Value> DefaultSession(v8::Isolate* isolate);
v8::Global<v8::Value> default_session_;
assert.equal app.getName(), 'test-name'
app.setName 'Electron Test'
+ describe 'app.getLocale()', ->
+ it 'should not be empty', ->
+ assert.notEqual app.getLocale(), ''
+
describe 'BrowserWindow events', ->
w = null
afterEach ->