add line and column values to callback id
This commit is contained in:
parent
ac4df34ecd
commit
3a154ab8ea
8 changed files with 97 additions and 96 deletions
46
atom/common/api/atom_api_id_weak_map.h
Normal file
46
atom/common/api/atom_api_id_weak_map.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ATOM_COMMON_API_ATOM_API_ID_WEAK_MAP_H_
|
||||
#define ATOM_COMMON_API_ATOM_API_ID_WEAK_MAP_H_
|
||||
|
||||
#include "atom/common/id_weak_map.h"
|
||||
#include "native_mate/object_template_builder.h"
|
||||
#include "native_mate/handle.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
namespace api {
|
||||
|
||||
class IDWeakMap : public mate::Wrappable {
|
||||
public:
|
||||
static mate::Wrappable* Create(v8::Isolate* isolate);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> prototype);
|
||||
|
||||
protected:
|
||||
IDWeakMap();
|
||||
virtual ~IDWeakMap();
|
||||
|
||||
// mate::Wrappable:
|
||||
bool IsDestroyed() const override;
|
||||
|
||||
private:
|
||||
// Api for IDWeakMap.
|
||||
void Set(v8::Isolate* isolate, int32_t id, v8::Local<v8::Object> object);
|
||||
v8::Local<v8::Object> Get(v8::Isolate* isolate, int32_t id);
|
||||
bool Has(int32_t id);
|
||||
void Remove(int32_t id);
|
||||
|
||||
scoped_ptr<atom::IDWeakMap> id_weak_map_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(IDWeakMap);
|
||||
};
|
||||
|
||||
} // namespace api
|
||||
|
||||
} // namespace atom
|
||||
|
||||
#endif // ATOM_COMMON_API_ATOM_API_ID_WEAK_MAP_H_
|
Loading…
Add table
Add a link
Reference in a new issue