Skelecton for the protocol module.

This commit is contained in:
Cheng Zhao 2013-08-24 15:26:10 +08:00
parent fd299cb3fe
commit b9cbfb8103
5 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,34 @@
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "browser/api/atom_api_protocol.h"
#include "net/url_request/url_request_job_manager.h"
#include "vendor/node/src/node.h"
namespace atom {
namespace api {
// static
v8::Handle<v8::Value> Protocol::RegisterProtocol(const v8::Arguments& args) {
return v8::Undefined();
}
// static
v8::Handle<v8::Value> Protocol::UnregisterProtocol(const v8::Arguments& args) {
return v8::Undefined();
}
// static
void Protocol::Initialize(v8::Handle<v8::Object> target) {
node::SetMethod(target, "registerProtocol", RegisterProtocol);
node::SetMethod(target, "unregisterProtocol", UnregisterProtocol);
}
} // namespace api
} // namespace atom
NODE_MODULE(atom_browser_protocol, atom::api::Protocol::Initialize)