blob: 617fd08e26d6108239cf2852902a32cdb2bd4139 [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
7#include <map>
8
9#include "gin/per_isolate_data.h"
10
11namespace gin {
12
13NamedPropertyInterceptor::NamedPropertyInterceptor(v8::Isolate* isolate,
14 WrappableBase* base)
15 : isolate_(isolate), base_(base) {
16 PerIsolateData::From(isolate_)->SetNamedPropertyInterceptor(base_, this);
17}
18
19NamedPropertyInterceptor::~NamedPropertyInterceptor() {
20 PerIsolateData::From(isolate_)->ClearNamedPropertyInterceptor(base_, this);
21}
22
23v8::Local<v8::Value> NamedPropertyInterceptor::GetNamedProperty(
24 v8::Isolate* isolate,
25 const std::string& property) {
26 return v8::Local<v8::Value>();
27}
28
[email protected]d656f872014-08-13 17:12:5529bool NamedPropertyInterceptor::SetNamedProperty(v8::Isolate* isolate,
[email protected]5c969b82014-03-12 04:59:0530 const std::string& property,
[email protected]d656f872014-08-13 17:12:5531 v8::Local<v8::Value> value) {
32 return false;
33}
[email protected]5c969b82014-03-12 04:59:0534
35std::vector<std::string> NamedPropertyInterceptor::EnumerateNamedProperties(
36 v8::Isolate* isolate) {
37 return std::vector<std::string>();
38}
39
40IndexedPropertyInterceptor::IndexedPropertyInterceptor(v8::Isolate* isolate,
41 WrappableBase* base)
42 : isolate_(isolate), base_(base) {
43 PerIsolateData::From(isolate_)->SetIndexedPropertyInterceptor(base_, this);
44}
45
46IndexedPropertyInterceptor::~IndexedPropertyInterceptor() {
47 PerIsolateData::From(isolate_)->ClearIndexedPropertyInterceptor(base_, this);
48}
49
50v8::Local<v8::Value> IndexedPropertyInterceptor::GetIndexedProperty(
51 v8::Isolate* isolate,
52 uint32_t index) {
53 return v8::Local<v8::Value>();
54}
55
[email protected]d656f872014-08-13 17:12:5556bool IndexedPropertyInterceptor::SetIndexedProperty(
[email protected]5c969b82014-03-12 04:59:0557 v8::Isolate* isolate,
58 uint32_t index,
[email protected]d656f872014-08-13 17:12:5559 v8::Local<v8::Value> value) {
60 return false;
61}
[email protected]5c969b82014-03-12 04:59:0562
63std::vector<uint32_t> IndexedPropertyInterceptor::EnumerateIndexedProperties(
64 v8::Isolate* isolate) {
65 return std::vector<uint32_t>();
66}
67
68} // namespace gin