blob: 6b7b8127ac698378c1116ee2f5f81d5a61ac855c [file] [log] [blame]
[email protected]5c969b82014-03-12 04:59:051// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "gin/interceptor.h"
6
avi90e658dd2015-12-21 07:16:197#include <stdint.h>
8
[email protected]5c969b82014-03-12 04:59:059#include <map>
10
11#include "gin/per_isolate_data.h"
12
13namespace gin {
14
15NamedPropertyInterceptor::NamedPropertyInterceptor(v8::Isolate* isolate,
16 WrappableBase* base)
17 : isolate_(isolate), base_(base) {
18 PerIsolateData::From(isolate_)->SetNamedPropertyInterceptor(base_, this);
19}
20
21NamedPropertyInterceptor::~NamedPropertyInterceptor() {
22 PerIsolateData::From(isolate_)->ClearNamedPropertyInterceptor(base_, this);
23}
24
25v8::Local<v8::Value> NamedPropertyInterceptor::GetNamedProperty(
26 v8::Isolate* isolate,
27 const std::string& property) {
28 return v8::Local<v8::Value>();
29}
30
[email protected]d656f872014-08-13 17:12:5531bool NamedPropertyInterceptor::SetNamedProperty(v8::Isolate* isolate,
[email protected]5c969b82014-03-12 04:59:0532 const std::string& property,
[email protected]d656f872014-08-13 17:12:5533 v8::Local<v8::Value> value) {
34 return false;
35}
[email protected]5c969b82014-03-12 04:59:0536
37std::vector<std::string> NamedPropertyInterceptor::EnumerateNamedProperties(
38 v8::Isolate* isolate) {
39 return std::vector<std::string>();
40}
41
42IndexedPropertyInterceptor::IndexedPropertyInterceptor(v8::Isolate* isolate,
43 WrappableBase* base)
44 : isolate_(isolate), base_(base) {
45 PerIsolateData::From(isolate_)->SetIndexedPropertyInterceptor(base_, this);
46}
47
48IndexedPropertyInterceptor::~IndexedPropertyInterceptor() {
49 PerIsolateData::From(isolate_)->ClearIndexedPropertyInterceptor(base_, this);
50}
51
52v8::Local<v8::Value> IndexedPropertyInterceptor::GetIndexedProperty(
53 v8::Isolate* isolate,
54 uint32_t index) {
55 return v8::Local<v8::Value>();
56}
57
[email protected]d656f872014-08-13 17:12:5558bool IndexedPropertyInterceptor::SetIndexedProperty(
[email protected]5c969b82014-03-12 04:59:0559 v8::Isolate* isolate,
60 uint32_t index,
[email protected]d656f872014-08-13 17:12:5561 v8::Local<v8::Value> value) {
62 return false;
63}
[email protected]5c969b82014-03-12 04:59:0564
65std::vector<uint32_t> IndexedPropertyInterceptor::EnumerateIndexedProperties(
66 v8::Isolate* isolate) {
67 return std::vector<uint32_t>();
68}
69
70} // namespace gin