| Index: generated_files_will_not_submit/experimental.declarative.h
|
| diff --git a/generated_files_will_not_submit/experimental.declarative.h b/generated_files_will_not_submit/experimental.declarative.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..82fa53893338e806fd2cb7f5fd9f8af84d730b39
|
| --- /dev/null
|
| +++ b/generated_files_will_not_submit/experimental.declarative.h
|
| @@ -0,0 +1,145 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +// GENERATED FROM THE API DEFINITION IN
|
| +// chrome/common/extensions/api/experimental.declarative.json
|
| +// DO NOT EDIT.
|
| +
|
| +#ifndef CHROME_COMMON_EXTENSIONS_API_EXPERIMENTAL_H__
|
| +#define CHROME_COMMON_EXTENSIONS_API_EXPERIMENTAL_H__
|
| +#pragma once
|
| +
|
| +#include <string>
|
| +#include <vector>
|
| +
|
| +#include "base/basictypes.h"
|
| +#include "base/memory/linked_ptr.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "base/values.h"
|
| +
|
| +namespace extensions {
|
| +namespace api {
|
| +namespace experimental {
|
| +
|
| +//
|
| +// Types
|
| +//
|
| +
|
| +// Description of a declarative rule for handling events.
|
| +struct Rule {
|
| + ~Rule();
|
| + Rule();
|
| +
|
| + // Optional priority of this rule. Defaults to 100.
|
| + scoped_ptr<int> priority;
|
| +
|
| + // List of conditions that can trigger the actions.
|
| + std::vector<linked_ptr<DictionaryValue> > conditions;
|
| +
|
| + // Optional identifier that allows referencing this rule.
|
| + scoped_ptr<std::string> id;
|
| +
|
| + // List of actions that are triggered if one of the condtions is fulfilled.
|
| + std::vector<linked_ptr<DictionaryValue> > actions;
|
| +
|
| + // Populates a Rule object from a Value. Returns whether |out| was
|
| + // successfully populated.
|
| + static bool Populate(const Value& value, Rule* out);
|
| +
|
| + // Returns a new DictionaryValue representing the serialized form of this
|
| + // Rule object. Passes ownership to caller.
|
| + scoped_ptr<DictionaryValue> ToValue() const;
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(Rule);
|
| +};
|
| +
|
| +//
|
| +// Functions
|
| +//
|
| +
|
| +namespace GetRules {
|
| + struct Params {
|
| + // Name of the event this function affects.
|
| + std::string event;
|
| +
|
| + // If an array is passed, only rules with identifiers contained in this array
|
| + // are returned.
|
| + scoped_ptr<std::vector<std::string> > rule_identifiers;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // Rules that were registered, the optional parameters are filled with
|
| + // values.
|
| + Value* Create(const std::vector<linked_ptr<Rule> >& rules);
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace RemoveRules {
|
| + struct Params {
|
| + // Name of the event this function affects.
|
| + std::string event;
|
| +
|
| + // If an array is passed, only rules with identifiers contained in this array
|
| + // are unregistered.
|
| + scoped_ptr<std::vector<std::string> > rule_identifiers;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + Value* Create();
|
| + };
|
| +
|
| +};
|
| +
|
| +namespace AddRules {
|
| + struct Params {
|
| + // Name of the event this function affects.
|
| + std::string event;
|
| +
|
| + // Rules to be registered. These do not replace previously registered rules.
|
| + std::vector<linked_ptr<Rule> > rules;
|
| +
|
| + ~Params();
|
| +
|
| + static scoped_ptr<Params> Create(const ListValue& args);
|
| +
|
| + private:
|
| + Params();
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(Params);
|
| + };
|
| +
|
| + namespace Result {
|
| + // Rules that were registered, the optional parameters are filled with
|
| + // values.
|
| + Value* Create(const std::vector<linked_ptr<Rule> >& rules);
|
| + };
|
| +
|
| +};
|
| +
|
| +
|
| +} // experimental
|
| +} // api
|
| +} // extensions
|
| +
|
| +#endif // CHROME_COMMON_EXTENSIONS_API_EXPERIMENTAL_H__
|
|
|