2013-04-29 13:57:05 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
2014-04-25 09:49:37 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-04-29 13:57:05 +00:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2014-03-16 00:30:26 +00:00
|
|
|
#include "atom/common/platform_util.h"
|
2014-04-17 05:45:14 +00:00
|
|
|
#include "atom/common/native_mate_converters/file_path_converter.h"
|
2014-04-22 15:07:21 +00:00
|
|
|
#include "atom/common/native_mate_converters/gurl_converter.h"
|
2014-04-16 07:31:59 +00:00
|
|
|
#include "native_mate/dictionary.h"
|
2013-12-11 07:48:19 +00:00
|
|
|
|
2014-04-17 05:45:14 +00:00
|
|
|
#include "atom/common/node_includes.h"
|
2013-04-29 13:57:05 +00:00
|
|
|
|
2014-04-15 07:41:26 +00:00
|
|
|
namespace {
|
|
|
|
|
|
|
|
void Initialize(v8::Handle<v8::Object> exports) {
|
2014-04-16 07:31:59 +00:00
|
|
|
mate::Dictionary dict(v8::Isolate::GetCurrent(), exports);
|
|
|
|
dict.SetMethod("showItemInFolder", &platform_util::ShowItemInFolder);
|
|
|
|
dict.SetMethod("openItem", &platform_util::OpenItem);
|
|
|
|
dict.SetMethod("openExternal", &platform_util::OpenExternal);
|
|
|
|
dict.SetMethod("moveItemToTrash", &platform_util::MoveItemToTrash);
|
|
|
|
dict.SetMethod("beep", &platform_util::Beep);
|
2013-04-29 13:57:05 +00:00
|
|
|
}
|
|
|
|
|
2014-04-15 07:41:26 +00:00
|
|
|
} // namespace
|
2013-04-29 13:57:05 +00:00
|
|
|
|
2014-04-15 07:41:26 +00:00
|
|
|
NODE_MODULE(atom_common_shell, Initialize)
|