Chromium Code Reviews| Index: generated_files_will_not_submit/permissions.h |
| diff --git a/generated_files_will_not_submit/permissions.h b/generated_files_will_not_submit/permissions.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..94652183b3454a92e6878b0095fd2ae6ed4e6609 |
| --- /dev/null |
| +++ b/generated_files_will_not_submit/permissions.h |
| @@ -0,0 +1,156 @@ |
| +// 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/permissions.json |
| +// DO NOT EDIT. |
| + |
|
not at google - send to devlin
2012/02/05 23:42:12
is there any difference between how this file and
calamity
2012/02/06 11:51:18
Not really? I just included it for sake of complet
not at google - send to devlin
2012/02/06 13:14:48
(not quite what I meant but nvm, not important)
|
| +#ifndef CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_H__ |
| +#define CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_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" |
| + |
| +using base::Value; |
| +using base::DictionaryValue; |
| +using base::ListValue; |
| + |
| +namespace extensions { |
| +namespace api { |
| +namespace permissions { |
| + |
| +// |
| +// Types |
| +// |
| + |
| +struct Permissions { |
| + ~Permissions(); |
| + Permissions(); |
| + |
| + // List of origin permissions. |
| + scoped_ptr<std::vector<std::string> > origins; |
| + |
| + // List of named permissions (does not include hosts or origins). |
| + scoped_ptr<std::vector<std::string> > permissions; |
| + |
| + // Populates a Permissions object from a Value. Returns whether |out| was |
| + // successfully populated. |
| + static bool Populate(const Value& value, Permissions* out); |
| + |
| + // Returns a new DictionaryValue representing the serialized form of this |
| + // Permissions object. Passesownership to caller. |
| + DictionaryValue* ToValue() const; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(Permissions); |
| +}; |
| + |
| +// |
| +// Functions |
| +// |
| + |
| +namespace Contains { |
| + struct Params { |
| + Permissions permissions; |
| + |
| + ~Params(); |
| + |
| + static scoped_ptr<Params> Create(const ListValue& args); |
| + |
| + private: |
| + Params(); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(Params); |
| + }; |
| + |
| + class Result { |
| + public: |
| + // True if the extension has the specified permissions. |
| + static Value* Create(const bool result); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| +namespace GetAll { |
| + |
| + class Result { |
| + public: |
| + // The extension's active permissions. |
| + static Value* Create(const Permissions& permissions); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| +namespace Request { |
| + struct Params { |
| + Permissions permissions; |
| + |
| + ~Params(); |
| + |
| + static scoped_ptr<Params> Create(const ListValue& args); |
| + |
| + private: |
| + Params(); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(Params); |
| + }; |
| + |
| + class Result { |
| + public: |
| + // True if the user granted the specified permissions. |
| + static Value* Create(const bool granted); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| +namespace Remove { |
| + struct Params { |
| + Permissions permissions; |
| + |
| + ~Params(); |
| + |
| + static scoped_ptr<Params> Create(const ListValue& args); |
| + |
| + private: |
| + Params(); |
| + |
| + DISALLOW_COPY_AND_ASSIGN(Params); |
| + }; |
| + |
| + class Result { |
| + public: |
| + // True if the permissions were removed. |
| + static Value* Create(const bool removed); |
| + |
| + private: |
| + Result() {}; |
| + DISALLOW_COPY_AND_ASSIGN(Result); |
| + }; |
| + |
| +}; |
| + |
| + |
| +} // permissions |
| +} // api |
| +} // extensions |
| + |
| +#endif // CHROME_COMMON_EXTENSIONS_API_PERMISSIONS_H__ |