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"
9 #include "gin/per_isolate_data.h"
13 NamedPropertyInterceptor::NamedPropertyInterceptor(v8::Isolate* isolate,
15 : isolate_(isolate), base_(base) {
16 PerIsolateData::From(isolate_)->SetNamedPropertyInterceptor(base_, this);
19 NamedPropertyInterceptor::~NamedPropertyInterceptor() {
20 PerIsolateData::From(isolate_)->ClearNamedPropertyInterceptor(base_, this);
23 v8::Local<v8::Value> NamedPropertyInterceptor::GetNamedProperty(
25 const std::string& property) {
26 return v8::Local<v8::Value>();
29 bool NamedPropertyInterceptor::SetNamedProperty(v8::Isolate* isolate,
30 const std::string& property,
31 v8::Local<v8::Value> value) {
35 std::vector<std::string> NamedPropertyInterceptor::EnumerateNamedProperties(
36 v8::Isolate* isolate) {
37 return std::vector<std::string>();
40 IndexedPropertyInterceptor::IndexedPropertyInterceptor(v8::Isolate* isolate,
42 : isolate_(isolate), base_(base) {
43 PerIsolateData::From(isolate_)->SetIndexedPropertyInterceptor(base_, this);
46 IndexedPropertyInterceptor::~IndexedPropertyInterceptor() {
47 PerIsolateData::From(isolate_)->ClearIndexedPropertyInterceptor(base_, this);
50 v8::Local<v8::Value> IndexedPropertyInterceptor::GetIndexedProperty(
53 return v8::Local<v8::Value>();
56 bool IndexedPropertyInterceptor::SetIndexedProperty(
59 v8::Local<v8::Value> value) {
63 std::vector<uint32_t> IndexedPropertyInterceptor::EnumerateIndexedProperties(
64 v8::Isolate* isolate) {
65 return std::vector<uint32_t>();