Use native_mate to simplify dialog api.

This commit is contained in:
Cheng Zhao 2014-04-16 15:14:44 +08:00
parent 6e2bf824f0
commit aa1efe70e2
10 changed files with 189 additions and 143 deletions

View file

@ -5,7 +5,7 @@
#include <string>
#include "atom/common/platform_util.h"
#include "base/files/file_path.h"
#include "atom/common/v8_converters/file_path_converter.h"
#include "native_mate/object_template_builder.h"
#include "url/gurl.h"
@ -28,21 +28,6 @@ struct Converter<GURL> {
}
};
template<>
struct Converter<base::FilePath> {
static bool FromV8(v8::Isolate* isolate,
v8::Handle<v8::Value> val,
base::FilePath* out) {
std::string path;
if (Converter<std::string>::FromV8(isolate, val, &path)) {
*out = base::FilePath::FromUTF8Unsafe(path);
return true;
} else {
return false;
}
}
};
} // namespace mate
namespace {