1 // 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.
5 #include "gin/interceptor.h"
11 #include "gin/per_isolate_data.h"
15 NamedPropertyInterceptor::NamedPropertyInterceptor(v8::Isolate* isolate,
17 : isolate_(isolate), base_(base) {
18 PerIsolateData::From(isolate_)->SetNamedPropertyInterceptor(base_, this);
21 NamedPropertyInterceptor::~NamedPropertyInterceptor() {
22 PerIsolateData::From(isolate_)->ClearNamedPropertyInterceptor(base_, this);
25 v8::Local<v8::Value> NamedPropertyInterceptor::GetNamedProperty(
27 const std::string& property) {
28 return v8::Local<v8::Value>();
31 bool NamedPropertyInterceptor::SetNamedProperty(v8::Isolate* isolate,
32 const std::string& property,
33 v8::Local<v8::Value> value) {
37 std::vector<std::string> NamedPropertyInterceptor::EnumerateNamedProperties(
38 v8::Isolate* isolate) {
39 return std::vector<std::string>();
42 IndexedPropertyInterceptor::IndexedPropertyInterceptor(v8::Isolate* isolate,
44 : isolate_(isolate), base_(base) {
45 PerIsolateData::From(isolate_)->SetIndexedPropertyInterceptor(base_, this);
48 IndexedPropertyInterceptor::~IndexedPropertyInterceptor() {
49 PerIsolateData::From(isolate_)->ClearIndexedPropertyInterceptor(base_, this);
52 v8::Local<v8::Value> IndexedPropertyInterceptor::GetIndexedProperty(
55 return v8::Local<v8::Value>();
58 bool IndexedPropertyInterceptor::SetIndexedProperty(
61 v8::Local<v8::Value> value) {
65 std::vector<uint32_t> IndexedPropertyInterceptor::EnumerateIndexedProperties(
66 v8::Isolate* isolate) {
67 return std::vector<uint32_t>();