tools/profiler/JSAObjectBuilder.h
author Kan-Ru Chen (陳侃如) <kanru@kanru.info>
Thu, 07 Mar 2013 08:35:38 -0500
changeset 124106 fc9cdf372502878c8da412c6d50c2a0f0f80c13b
parent 114614 b130bb991d84db729555ad5b837dc3c5eb1a74a7
permissions -rw-r--r--
Bug 838547 - We are only interested to the pagehide event from the root document. r=smaug

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef JSAOBJECTBUILDER_H
#define JSAOBJECTBUILDER_H

class JSCustomObject;
class JSCustomArray;
class nsAString;

class JSAObjectBuilder
{
public:
  virtual ~JSAObjectBuilder() = 0;

  virtual void DefineProperty(JSCustomObject *aObject, const char *name, JSCustomObject *aValue) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, JSCustomArray *aValue) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, int value) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, double value) = 0;
  virtual void DefineProperty(JSCustomObject *aObject, const char *name, const char *value) = 0;
  virtual void ArrayPush(JSCustomArray *aArray, int value) = 0;
  virtual void ArrayPush(JSCustomArray *aArray, const char *value) = 0;
  virtual void ArrayPush(JSCustomArray *aArray, JSCustomObject *aObject) = 0;
  virtual JSCustomArray  *CreateArray() = 0;
  virtual JSCustomObject *CreateObject() = 0;
};

#endif